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<N extends core::Object, S extends core::Object, U extends core::Object>
extends core::Object { | |
7 final field core::List<self::A::U> field; | |
8 constructor •(self::A::N n, self::A::S s) → dynamic | |
9 : self::A::field = core::List::•<self::A::U>(), super core::Object::•() { | |
10 exp::Expect::isTrue(n is self::A::N); | |
11 exp::Expect::isTrue(s is self::A::S); | |
12 } | |
13 constructor empty() → dynamic | |
14 : self::A::field = null, super core::Object::•() {} | |
15 const constructor c(self::A::U u, self::A::S s) → dynamic | |
16 : self::A::field = const <dynamic>[null], super core::Object::•() | |
17 ; | |
18 static factory f<N extends core::Object, S extends core::Object, U extends cor
e::Object>(self::A::f::S s) → self::A<self::A::f::N, self::A::f::S, self::A::f::
U> { | |
19 exp::Expect::isTrue(s is self::A::f::S); | |
20 return new self::A::empty<dynamic, dynamic, dynamic>(); | |
21 } | |
22 get getter() → core::List<self::A::U> { | |
23 return this.field; | |
24 } | |
25 set setter(self::A::S s) → void {} | |
26 } | |
27 abstract class J<Aa extends core::Object, B extends core::Object> extends core::
Object { | |
28 constructor •() → self::J<self::J::Aa, self::J::B> | |
29 : super core::Object::•(); | |
30 } | |
31 abstract class I<H extends core::Object, C extends core::Object, K extends core:
:Object> extends self::J<self::I::C, self::I::K> { | |
32 constructor •() → self::I<self::I::H, self::I::C, self::I::K> | |
33 : super self::J::•(); | |
34 } | |
35 static method main() → dynamic { | |
36 new self::A::•<core::num, core::double, core::List<dynamic>>(1, 2.0); | |
37 self::A<dynamic, dynamic, dynamic> a = self::A::f<core::int, core::int, core::
int>(1); | |
38 const self::A::c<core::int, core::int, core::List<dynamic>>(const <dynamic>[],
1); | |
39 dynamic z = a.getter; | |
40 a.setter = 1; | |
41 } | |
OLD | NEW |