OLD | NEW |
| (Empty) |
1 library; | |
2 import self as self; | |
3 import "dart:core" as core; | |
4 | |
5 class Foo extends core::Object { | |
6 constructor •() → void | |
7 : super core::Object::•() | |
8 ; | |
9 method method(dynamic x, [dynamic y, dynamic z]) → dynamic { | |
10 return "string"; | |
11 } | |
12 } | |
13 abstract class External extends core::Object { | |
14 constructor •() → void | |
15 : super core::Object::•() | |
16 ; | |
17 abstract method externalMethod(core::int x, [core::int y, core::int z]) → core
::String; | |
18 abstract method listen(self::Listener listener) → void; | |
19 } | |
20 abstract class Listener extends core::Object { | |
21 constructor •() → void | |
22 : super core::Object::•() | |
23 ; | |
24 abstract method event(core::String input, [core::int x, core::int y]) → void; | |
25 } | |
26 class TestListener extends self::Listener { | |
27 constructor •() → void | |
28 : super self::Listener::•() | |
29 ; | |
30 method event(dynamic input, [dynamic x, dynamic y]) → void {} | |
31 } | |
32 class ExtendedListener extends self::Listener { | |
33 constructor •() → void | |
34 : super self::Listener::•() | |
35 ; | |
36 method event(dynamic input, [dynamic x, dynamic y, dynamic z]) → void {} | |
37 } | |
38 class InvalidListener extends core::Object { | |
39 constructor •() → void | |
40 : super core::Object::•() | |
41 ; | |
42 method event(dynamic input, [dynamic x]) → void {} | |
43 } | |
44 external static method createExternal() → self::External; | |
45 static method main() → dynamic { | |
46 dynamic foo = new self::Foo::•(); | |
47 dynamic string1 = foo.method(1); | |
48 dynamic string2 = foo.method(1, 2); | |
49 dynamic string3 = foo.method(1, 2, 3); | |
50 dynamic extern = self::createExternal(); | |
51 dynamic string4 = extern.externalMethod(1); | |
52 dynamic string5 = extern.externalMethod(1, 2); | |
53 dynamic string6 = extern.externalMethod(1, 2, 3); | |
54 extern.listen(new self::TestListener::•()); | |
55 extern.listen(new self::ExtendedListener::•()); | |
56 extern.listen(new self::InvalidListener::•()); | |
57 dynamic nothing1 = foo.method(); | |
58 dynamic nothing2 = foo.method(1, 2, 3, 4); | |
59 dynamic nothing3 = extern.externalMethod(); | |
60 dynamic nothing4 = extern.externalMethod(1, 2, 3, 4); | |
61 } | |
OLD | NEW |