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 UnusedClass extends core::Object { | 5 class UnusedClass extends core::Object { |
6 constructor •() → void | 6 constructor •() → void |
7 : super core::Object::•() { | 7 : super core::Object::•() { |
8 core::print("Unused"); | 8 core::print("Unused"); |
9 } | 9 } |
10 } | 10 } |
11 abstract class UsedAsBaseClass extends core::Object { | 11 abstract class UsedAsBaseClass extends core::Object { |
12 constructor •() → void | 12 default constructor •() → void |
13 : super core::Object::•() | 13 : super core::Object::•() |
14 ; | 14 ; |
15 method usedInSubclass() → void { | 15 method usedInSubclass() → void { |
16 core::print("Unused"); | 16 core::print("Unused"); |
17 } | 17 } |
18 method calledFromB() → void { | 18 method calledFromB() → void { |
19 this.calledFromSubclass(); | 19 this.calledFromSubclass(); |
20 } | 20 } |
21 method calledFromSubclass() → void { | 21 method calledFromSubclass() → void { |
22 core::print("Unused"); | 22 core::print("Unused"); |
23 } | 23 } |
24 } | 24 } |
25 class UsedAsInterface extends core::Object { | 25 class UsedAsInterface extends core::Object { |
26 constructor •() → void | 26 default constructor •() → void |
27 : super core::Object::•() | 27 : super core::Object::•() |
28 ; | 28 ; |
29 method usedInSubclass() → void { | 29 method usedInSubclass() → void { |
30 core::print("Unused"); | 30 core::print("Unused"); |
31 } | 31 } |
32 } | 32 } |
33 class InstantiatedButMethodsUnused extends core::Object { | 33 class InstantiatedButMethodsUnused extends core::Object { |
34 constructor •() → void | 34 default constructor •() → void |
35 : super core::Object::•() | 35 : super core::Object::•() |
36 ; | 36 ; |
37 method usedInSubclass() → void { | 37 method usedInSubclass() → void { |
38 core::print("Unused"); | 38 core::print("Unused"); |
39 } | 39 } |
40 } | 40 } |
41 class ClassA extends self::UsedAsBaseClass implements self::UsedAsInterface, sel
f::InstantiatedButMethodsUnused { | 41 class ClassA extends self::UsedAsBaseClass implements self::UsedAsInterface, sel
f::InstantiatedButMethodsUnused { |
42 constructor •() → void | 42 default constructor •() → void |
43 : super self::UsedAsBaseClass::•() | 43 : super self::UsedAsBaseClass::•() |
44 ; | 44 ; |
45 method usedInSubclass() → void { | 45 method usedInSubclass() → void { |
46 core::print("A"); | 46 core::print("A"); |
47 } | 47 } |
48 } | 48 } |
49 class ClassB extends self::UsedAsBaseClass implements self::UsedAsInterface, sel
f::InstantiatedButMethodsUnused { | 49 class ClassB extends self::UsedAsBaseClass implements self::UsedAsInterface, sel
f::InstantiatedButMethodsUnused { |
50 constructor •() → void | 50 default constructor •() → void |
51 : super self::UsedAsBaseClass::•() | 51 : super self::UsedAsBaseClass::•() |
52 ; | 52 ; |
53 method usedInSubclass() → void { | 53 method usedInSubclass() → void { |
54 core::print("B"); | 54 core::print("B"); |
55 this.calledFromB(); | 55 this.calledFromB(); |
56 } | 56 } |
57 method calledFromSubclass() → void {} | 57 method calledFromSubclass() → void {} |
58 } | 58 } |
59 static method baseClassCall(self::UsedAsBaseClass object) → void { | 59 static method baseClassCall(self::UsedAsBaseClass object) → void { |
60 object.usedInSubclass(); | 60 object.usedInSubclass(); |
(...skipping 16 matching lines...) Expand all Loading... |
77 self::ClassA a = new self::ClassA::•(); | 77 self::ClassA a = new self::ClassA::•(); |
78 self::exactCallA(a); | 78 self::exactCallA(a); |
79 self::baseClassCall(a); | 79 self::baseClassCall(a); |
80 self::interfaceCall(a); | 80 self::interfaceCall(a); |
81 self::ClassB b = new self::ClassB::•(); | 81 self::ClassB b = new self::ClassB::•(); |
82 self::exactCallB(b); | 82 self::exactCallB(b); |
83 self::baseClassCall(b); | 83 self::baseClassCall(b); |
84 self::interfaceCall(b); | 84 self::interfaceCall(b); |
85 new self::InstantiatedButMethodsUnused::•(); | 85 new self::InstantiatedButMethodsUnused::•(); |
86 } | 86 } |
OLD | NEW |