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 constructor •() → void |
7 : super core::Object::•() | 7 : super core::Object::•() |
8 ; | 8 ; |
9 method instanceMethod() → dynamic { | 9 method instanceMethod() → dynamic { |
10 return 123; | 10 return 123; |
11 } | 11 } |
12 } | 12 } |
13 abstract class ExternalValue extends core::Object { | 13 abstract class ExternalValue extends core::Object { |
| 14 constructor •() → void |
| 15 : super core::Object::•() |
| 16 ; |
14 } | 17 } |
15 abstract class Bar extends core::Object { | 18 abstract class Bar extends core::Object { |
| 19 constructor •() → void |
| 20 : super core::Object::•() |
| 21 ; |
16 abstract method externalInstanceMethod() → self::ExternalValue; | 22 abstract method externalInstanceMethod() → self::ExternalValue; |
17 } | 23 } |
18 class Box extends core::Object { | 24 class Box extends core::Object { |
19 field dynamic field = null; | 25 field dynamic field = null; |
20 constructor •() → void | 26 constructor •() → void |
21 : super core::Object::•() | 27 : super core::Object::•() |
22 ; | 28 ; |
23 } | 29 } |
24 class FinalBox extends core::Object { | 30 class FinalBox extends core::Object { |
25 final field dynamic finalField; | 31 final field dynamic finalField; |
(...skipping 14 matching lines...) Expand all Loading... |
40 } | 46 } |
41 class DynamicReceiver2 extends core::Object { | 47 class DynamicReceiver2 extends core::Object { |
42 constructor •() → void | 48 constructor •() → void |
43 : super core::Object::•() | 49 : super core::Object::•() |
44 ; | 50 ; |
45 method dynamicallyCalled(dynamic x) → dynamic {} | 51 method dynamicallyCalled(dynamic x) → dynamic {} |
46 } | 52 } |
47 static method staticMethod() → dynamic { | 53 static method staticMethod() → dynamic { |
48 return "sdfg"; | 54 return "sdfg"; |
49 } | 55 } |
50 external static method externalStatic() → core::bool; | 56 external static abstract method externalStatic() → core::bool; |
51 external static method createBar() → self::Bar; | 57 external static abstract method createBar() → self::Bar; |
52 static method stringArgument(dynamic x) → dynamic {} | 58 static method stringArgument(dynamic x) → dynamic {} |
53 static method intArgument(dynamic x) → dynamic {} | 59 static method intArgument(dynamic x) → dynamic {} |
54 static method makeDynamicCall(dynamic receiver) → void { | 60 static method makeDynamicCall(dynamic receiver) → void { |
55 receiver.dynamicallyCalled("sdfg"); | 61 receiver.dynamicallyCalled("sdfg"); |
56 } | 62 } |
57 static method main() → dynamic { | 63 static method main() → dynamic { |
58 dynamic x = self::staticMethod(); | 64 dynamic x = self::staticMethod(); |
59 dynamic y = new self::Foo::•().{self::Foo::instanceMethod}(); | 65 dynamic y = new self::Foo::•().{self::Foo::instanceMethod}(); |
60 core::bool z = self::externalStatic(); | 66 core::bool z = self::externalStatic(); |
61 self::ExternalValue w = self::createBar().{self::Bar::externalInstanceMethod}(
); | 67 self::ExternalValue w = self::createBar().{self::Bar::externalInstanceMethod}(
); |
62 self::stringArgument("sdfg"); | 68 self::stringArgument("sdfg"); |
63 self::intArgument(42); | 69 self::intArgument(42); |
64 self::Box box = new self::Box::•(); | 70 self::Box box = new self::Box::•(); |
65 box.{self::Box::field} = "sdfg"; | 71 box.{self::Box::field} = "sdfg"; |
66 dynamic a = box.{self::Box::field}; | 72 dynamic a = box.{self::Box::field}; |
67 self::FinalBox finalBox = new self::FinalBox::•("dfg"); | 73 self::FinalBox finalBox = new self::FinalBox::•("dfg"); |
68 dynamic b = finalBox.{self::FinalBox::finalField}; | 74 dynamic b = finalBox.{self::FinalBox::finalField}; |
69 self::SubFinalBox subBox = new self::SubFinalBox::•("dfg"); | 75 self::SubFinalBox subBox = new self::SubFinalBox::•("dfg"); |
70 dynamic c = subBox.{self::FinalBox::finalField}; | 76 dynamic c = subBox.{self::FinalBox::finalField}; |
71 self::makeDynamicCall(new self::DynamicReceiver1::•()); | 77 self::makeDynamicCall(new self::DynamicReceiver1::•()); |
72 self::makeDynamicCall(new self::DynamicReceiver2::•()); | 78 self::makeDynamicCall(new self::DynamicReceiver2::•()); |
73 core::List<core::String> list = <core::String>["string"]; | 79 core::List<core::String> list = <core::String>["string"]; |
74 core::String d = list.{core::List::[]}(0); | 80 core::String d = list.{core::List::[]}(0); |
75 } | 81 } |
OLD | NEW |