OLD | NEW |
| (Empty) |
1 library; | |
2 import self as self; | |
3 import "dart:core" as core; | |
4 | |
5 abstract class A extends core::Object { | |
6 constructor •() → void | |
7 : super core::Object::•() | |
8 ; | |
9 } | |
10 abstract class B extends core::Object { | |
11 constructor •() → void | |
12 : super core::Object::•() | |
13 ; | |
14 } | |
15 class AB1 extends self::A implements self::B { | |
16 constructor •() → void | |
17 : super self::A::•() | |
18 ; | |
19 } | |
20 class AB2 extends self::A implements self::B { | |
21 constructor •() → void | |
22 : super self::A::•() | |
23 ; | |
24 } | |
25 class BA1 extends self::B implements self::A { | |
26 constructor •() → void | |
27 : super self::B::•() | |
28 ; | |
29 } | |
30 class BA2 extends self::B implements self::A { | |
31 constructor •() → void | |
32 : super self::B::•() | |
33 ; | |
34 } | |
35 static method takeSubclassOfA(dynamic obj) → dynamic {} | |
36 static method takeSubclassOfB(dynamic obj) → dynamic {} | |
37 static method main() → dynamic { | |
38 self::takeSubclassOfA(new self::AB1::•()); | |
39 self::takeSubclassOfA(new self::AB2::•()); | |
40 self::takeSubclassOfB(new self::BA1::•()); | |
41 self::takeSubclassOfB(new self::BA2::•()); | |
42 } | |
OLD | NEW |