Files
mgmt/lang/interpret_test/TestAstFunc2/import-double-star.txtar
James Shubin 81b102ed7f lang: ast: Allow multiple star imports
If more than one star import is present in the same scope, allow it. If
one star import could overwrite something, ordering is not guaranteed.
We allow this for now, but we might create a compiler fix to stop it.
This adds a test to notice both of these behaviours.
2025-01-17 14:03:48 -05:00

20 lines
345 B
Plaintext

-- metadata.yaml --
#files: "files/" # these are some extra files we can use (is the default)
-- main.mcl --
import "foo.mcl" as *
import "bar.mcl" as *
include foo("hello")
include bar("world")
-- foo.mcl --
class foo($s) {
test "${s}" {}
}
-- bar.mcl --
class bar($s) {
test "${s}" {}
}
-- OUTPUT --
Vertex: test[hello]
Vertex: test[world]