lang/interpret_test/TestAstFunc2/class-capture6.txtar
raw| 1 | -- main.mcl -- |
| 2 | $x1 = "bad1" |
| 3 | class foo($x1, $x2) { |
| 4 | include bar |
| 5 | test ["t1: " + $x1,] {} |
| 6 | test ["t2: " + $x2,] {} |
| 7 | class bar { |
| 8 | test ["t0: " + $x0,] {} |
| 9 | } |
| 10 | } |
| 11 | include foo("t1", $x2) |
| 12 | $x2 = "t2" |
| 13 | $x0 = "t0" |
| 14 | -- OUTPUT -- |
| 15 | Vertex: test[t0: t0] |
| 16 | Vertex: test[t1: t1] |
| 17 | Vertex: test[t2: t2] |