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