diff --git a/tests/test_compiler.py b/tests/test_compiler.py index 8c21db7..76918d6 100755 --- a/tests/test_compiler.py +++ b/tests/test_compiler.py @@ -1786,12 +1786,13 @@ def f2(): compile(r""" def (main: y = 5 - x : int:ptr = &y + x : const:int:ptr:const = &y # TODO just int:ptr used to work but now doesn't (though multiple mut syntax for pointers arguably should be implemented) - lambda (: + l = lambda (: std.cout << x return - ) () + ) + l() # NOTE: in the event we scan for non-escaping lambdas this may need updating (ref capture would be fine in such a case) ) """) raises(f2) @@ -1800,10 +1801,11 @@ def f3(): def (main: s = "nope" - lambda (: + l = lambda (: std.cout << s return - ) () + ) + l() ) """) raises(f3)