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