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