Files
mgmt/lang/interpret_test/TestAstFunc2/import-scope-vars2-fail.txtar
James Shubin 55eeb50fb4 lang: Refactor all the highlight helping together
Keep this cleaner and add a bit more.
2025-06-07 17:52:15 -04:00

15 lines
424 B
Plaintext

-- metadata.yaml --
#files: "files/" # these are some extra files we can use (is the default)
-- main.mcl --
import "y.mcl" as g
#test "${g.y}" {} # should work
test "${g.x}" {} # should fail
test "${g.f.x}" {} # should maybe work
-- x.mcl --
$x = "this is x.mcl"
-- y.mcl --
import "x.mcl" as f
$y = $f.x + " and this is y.mcl"
-- OUTPUT --
# err: errSetScope: var `$g.x` does not exist in this scope: /main.mcl @ 3:6-3:14