OLD | NEW |
1 class Foo { | 1 class Foo { |
2 method(x, [y, z]) { | 2 method(x, [y, z]) { |
3 return "string"; | 3 return "string"; |
4 } | 4 } |
5 } | 5 } |
6 | 6 |
7 abstract class External { | 7 abstract class External { |
8 String externalMethod(int x, [int y, int z]); | 8 String externalMethod(int x, [int y, int z]); |
9 void listen(Listener listener); | 9 void listen(Listener listener); |
10 } | 10 } |
| 11 |
11 external External createExternal(); | 12 external External createExternal(); |
12 | 13 |
13 abstract class Listener { | 14 abstract class Listener { |
14 void event(String input, [int x, int y]); | 15 void event(String input, [int x, int y]); |
15 } | 16 } |
16 | 17 |
17 class TestListener extends Listener { | 18 class TestListener extends Listener { |
18 void event(input, [x, y]) {} | 19 void event(input, [x, y]) {} |
19 } | 20 } |
20 | 21 |
(...skipping 18 matching lines...) Expand all Loading... |
39 | 40 |
40 extern.listen(new TestListener()); | 41 extern.listen(new TestListener()); |
41 extern.listen(new ExtendedListener()); | 42 extern.listen(new ExtendedListener()); |
42 extern.listen(new InvalidListener()); | 43 extern.listen(new InvalidListener()); |
43 | 44 |
44 var nothing1 = foo.method(); | 45 var nothing1 = foo.method(); |
45 var nothing2 = foo.method(1, 2, 3, 4); | 46 var nothing2 = foo.method(1, 2, 3, 4); |
46 var nothing3 = extern.externalMethod(); | 47 var nothing3 = extern.externalMethod(); |
47 var nothing4 = extern.externalMethod(1, 2, 3, 4); | 48 var nothing4 = extern.externalMethod(1, 2, 3, 4); |
48 } | 49 } |
OLD | NEW |