terps/tads/tads3/test/data/nested-anon-2.t
raw| 1 | #include <tads.h> |
| 2 | |
| 3 | main(args) |
| 4 | { |
| 5 | testObj.testMethod(); |
| 6 | } |
| 7 | |
| 8 | testObj: object |
| 9 | testMethod() |
| 10 | { |
| 11 | local lst = [1, 2, 3, 4, 5]; |
| 12 | |
| 13 | lst.forEach(new function(a) |
| 14 | { |
| 15 | "outer: a = <<a>>\n"; |
| 16 | lst.forEach(new function(b) |
| 17 | { |
| 18 | "inner: a = <<a>>, b = <<b>>\n"; |
| 19 | if (a != b && a < b) |
| 20 | lst -= b; |
| 21 | }); |
| 22 | }); |
| 23 | } |
| 24 | ; |