OLD | NEW |
(Empty) | |
| 1 library test; |
| 2 import self as self; |
| 3 import "dart:core" as core; |
| 4 |
| 5 typedef F<T extends core::Object> = (T) → dynamic; |
| 6 class C<T extends core::Object> extends core::Object { |
| 7 default constructor •() → void |
| 8 : super core::Object::•() |
| 9 ; |
| 10 method f(self::C::T x) → void {} |
| 11 method g1(self::C::T x) → void { |
| 12 this.f(x); |
| 13 } |
| 14 method g2(self::C::T x) → void { |
| 15 this.f(x); |
| 16 } |
| 17 method g3(self::C<self::C::T> c, self::C::T x) → void { |
| 18 c.f(x); |
| 19 } |
| 20 method g4() → (self::C::T) → dynamic |
| 21 return this.f; |
| 22 } |
| 23 class D extends self::C<core::int> { |
| 24 default constructor •() → void |
| 25 : super self::C::•() |
| 26 ; |
| 27 } |
| 28 class E extends self::C<core::num> { |
| 29 default constructor •() → void |
| 30 : super self::C::•() |
| 31 ; |
| 32 method f(core::int x) → void {} |
| 33 } |
| 34 static method test() → dynamic { |
| 35 dynamic x = new self::D::•().g4() as (core::Object) → dynamic; |
| 36 x.call("hi"); |
| 37 new self::E::•().g1(1.5); |
| 38 } |
| 39 static method main() → dynamic {} |
OLD | NEW |