Debian Codegraph @

lang/interpret_test/TestAstFunc2/class-include-as-class2.txtar

raw
1 -- main.mcl --
2 class c1($b) {
3 if $b { # scope doesn't leak up and out of `if` statement!
4 class inner() {
5 test "t1" {}
6 }
7 } else {
8 class inner() {
9 test "t2" {}
10 }
11 }
12 }
13
14 include c1 as i1
15 include i1.inner
16 -- OUTPUT --
17 # err: errSetScope: class `c1` expected 1 args but got 0