diff --git a/lang/interpret_test/TestAstFunc1/unused2.txtar b/lang/interpret_test/TestAstFunc1/unused2.txtar new file mode 100644 index 00000000..7363c5f7 --- /dev/null +++ b/lang/interpret_test/TestAstFunc1/unused2.txtar @@ -0,0 +1,19 @@ +-- main.mcl -- +import "fmt" +import "something.mcl" + +print "p1" { + msg => fmt.printf("someint: %d", $something.someint), +} +-- something.mcl -- +$someint = 42 +class someclass { + print "p2" { + msg => "i'm inside of someclass", + } +} + +# this should generate a compile error +include someclass +-- OUTPUT -- +# err: errSetScope: local import of `something.mcl` failed: module contains unused statements: found stmt: include(someclass)