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 typedef Callback = <T extends core::Object>(T) → void; |
5 class Foo<T extends core::Object> extends core::Object { | 6 class Foo<T extends core::Object> extends core::Object { |
6 final field self::Foo::T finalField; | 7 final field self::Foo::T finalField; |
7 final field (self::Foo::T) → void callbackField; | 8 final field (self::Foo::T) → void callbackField; |
8 field self::Foo::T mutableField = null; | 9 field self::Foo::T mutableField = null; |
9 field (self::Foo::T) → void mutableCallbackField = null; | 10 field (self::Foo::T) → void mutableCallbackField = null; |
10 constructor •(self::Foo::T finalField, (self::Foo::T) → void callbackField) →
void | 11 constructor •(self::Foo::T finalField, (self::Foo::T) → void callbackField) →
void |
11 : self::Foo::finalField = finalField, self::Foo::callbackField = callbackFie
ld, super core::Object::•() | 12 : self::Foo::finalField = finalField, self::Foo::callbackField = callbackFie
ld, super core::Object::•() |
12 ; | 13 ; |
13 method method(self::Foo::T x) → void {} | 14 method method(self::Foo::T x) → void {} |
14 set setter(self::Foo::T x) → dynamic {} | 15 set setter(self::Foo::T x) → dynamic {} |
(...skipping 14 matching lines...) Expand all Loading... |
29 fooNum.method(2.5); | 30 fooNum.method(2.5); |
30 fooNum.setter = 3; | 31 fooNum.setter = 3; |
31 fooNum.setter = 2.5; | 32 fooNum.setter = 2.5; |
32 fooNum.withCallback((core::num x) → dynamic {}); | 33 fooNum.withCallback((core::num x) → dynamic {}); |
33 fooNum.mutableField = 3; | 34 fooNum.mutableField = 3; |
34 fooNum.mutableField = 2.5; | 35 fooNum.mutableField = 2.5; |
35 fooNum.mutableCallbackField(3); | 36 fooNum.mutableCallbackField(3); |
36 fooNum.mutableCallbackField(2.5); | 37 fooNum.mutableCallbackField(2.5); |
37 fooNum.mutableCallbackField = (core::num x) → dynamic {}; | 38 fooNum.mutableCallbackField = (core::num x) → dynamic {}; |
38 } | 39 } |
OLD | NEW |