this repo has no description

Add append type

authored by bernsteinbear.com and committed by

Max Bernstein b5caf4b0 40c9ca60

+6
+6
scrapscript.py
··· 4568 4568 ty = infer_type(expr, OP_ENV) 4569 4569 self.assertTyEqual(ty, list_type(IntType)) 4570 4570 4571 + def test_append(self) -> None: 4572 + expr = parse(tokenize("[1] +< 2")) 4573 + ty = infer_type(expr, OP_ENV) 4574 + self.assertTyEqual(ty, list_type(IntType)) 4575 + 4571 4576 4572 4577 class SerializerTests(unittest.TestCase): 4573 4578 def _serialize(self, obj: Object) -> bytes: ··· 5332 5337 "/": Forall([], func_type(IntType, IntType, IntType)), 5333 5338 "++": Forall([], func_type(StringType, StringType, StringType)), 5334 5339 ">+": Forall([TyVar("a")], func_type(TyVar("a"), list_type(TyVar("a")), list_type(TyVar("a")))), 5340 + "+<": Forall([TyVar("a")], func_type(list_type(TyVar("a")), TyVar("a"), list_type(TyVar("a")))), 5335 5341 } 5336 5342 5337 5343