lang/interpret_test/TestAstFunc2/import-scope-vars2.txtar
raw| 1 | -- metadata.yaml -- |
| 2 | #files: "files/" # these are some extra files we can use (is the default) |
| 3 | -- main.mcl -- |
| 4 | import "y.mcl" as g |
| 5 | test "${g.y}" {} # should work |
| 6 | #test "${g.x}" {} # should fail |
| 7 | test "${g.f.x}" {} # should maybe work |
| 8 | -- x.mcl -- |
| 9 | $x = "this is x.mcl" |
| 10 | -- y.mcl -- |
| 11 | import "x.mcl" as f |
| 12 | $y = $f.x + " and this is y.mcl" |
| 13 | -- OUTPUT -- |
| 14 | Vertex: test[this is x.mcl and this is y.mcl] |
| 15 | Vertex: test[this is x.mcl] |