diff --git a/lang/interpret_test/TestAstFunc2/clear-env-on-var.txtar b/lang/interpret_test/TestAstFunc2/clear-env-on-var.txtar new file mode 100644 index 00000000..1e9ec3ac --- /dev/null +++ b/lang/interpret_test/TestAstFunc2/clear-env-on-var.txtar @@ -0,0 +1,9 @@ +-- main.mcl -- +$wat = $x +$f = func($x) { + $wat +} + +test $f("foo") {} +-- OUTPUT -- +# err: errSetScope: scope-checking the function definition `$f`: failed to set scope on function body: variable x not in scope