OLD | NEW |
| (Empty) |
1 library; | |
2 import self as self; | |
3 import "dart:core" as core; | |
4 import "package:expect/expect.dart" as exp; | |
5 | |
6 class A extends core::Object { | |
7 constructor •() → dynamic | |
8 : super core::Object::•() {} | |
9 static factory foo() → self::A | |
10 invalid-statement; | |
11 method m() → core::int {} | |
12 } | |
13 class C extends self::A { | |
14 constructor •() → dynamic | |
15 : super self::A::•() {} | |
16 static factory bar() → self::C | |
17 invalid-statement; | |
18 method m() → core::int { | |
19 return 1; | |
20 } | |
21 } | |
22 class D extends self::C { | |
23 constructor •() → self::D | |
24 : super self::C::•(); | |
25 method m() → core::int { | |
26 return 2; | |
27 } | |
28 } | |
29 static method main() → dynamic { | |
30 self::A a = new self::D::•(); | |
31 exp::Expect::equals(2, a.m()); | |
32 } | |
OLD | NEW |