OLD | NEW |
| (Empty) |
1 library; | |
2 import self as self; | |
3 import "dart:core" as core; | |
4 | |
5 class A extends core::Object { | |
6 field dynamic/Null field = null; | |
7 constructor •() → void | |
8 : super core::Object::•() | |
9 ; | |
10 } | |
11 class B extends core::Object { | |
12 field dynamic/core::int* {null,int} field = null; | |
13 constructor •() → void | |
14 : super core::Object::•() | |
15 ; | |
16 } | |
17 class C extends core::Object { | |
18 constructor •() → void | |
19 : super core::Object::•() | |
20 ; | |
21 operator ==(dynamic/Nothing x) → dynamic/core::bool* {other} | |
22 return false; | |
23 } | |
24 class X extends core::Object implements self::A, self::B { | |
25 field dynamic/core::int* {null,int} field = null; | |
26 constructor •() → void | |
27 : super core::Object::•() | |
28 ; | |
29 } | |
30 static method useAsA(self::A/self::A* {other} object) → void/Null { | |
31 dynamic/core::int* {null,int} _ = object.field; | |
32 } | |
33 static method useAsB(self::B/self::B* {other} object) → void/Null { | |
34 dynamic/core::int* {null,int} _ = object.field; | |
35 self::escape(object); | |
36 } | |
37 static method escape(dynamic/core::Object+ {int,string,other} x) → void/Null { | |
38 x.==(null) ? x = "" : null; | |
39 x.==(null) ? x = 45 : null; | |
40 if(!(x is core::int) && !(x is core::String)) { | |
41 x.field = 45; | |
42 } | |
43 } | |
44 static method main() → dynamic/Null { | |
45 dynamic/self::X! {other} object = new self::X::•(); | |
46 self::useAsA(new self::A::•()); | |
47 self::useAsA(object); | |
48 self::useAsB(new self::B::•()); | |
49 self::useAsB(object); | |
50 } | |
OLD | NEW |