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 Foo extends core::Object { | 5 class Foo extends core::Object { |
6 field dynamic field = null; | 6 field dynamic field = null; |
7 constructor •() → void | 7 constructor •() → void |
8 : super core::Object::•() | 8 : super core::Object::•() |
9 ; | 9 ; |
10 } | 10 } |
11 static method identity(dynamic x) → dynamic | 11 static method identity(dynamic x) → dynamic |
12 return x; | 12 return x; |
13 static method use(dynamic x) → void {} | 13 static method use(dynamic x) → void {} |
14 static method main(core::List<core::String> args) → dynamic { | 14 static method main(core::List<core::String> args) → dynamic { |
15 dynamic foo = self::identity(new self::Foo::•()); | 15 dynamic foo = self::identity(new self::Foo::•()); |
16 if(args.length.>(1)) { | 16 if(args.length.>(1)) { |
17 foo.field = "string"; | 17 foo.field = "string"; |
18 dynamic first = foo.field; | 18 dynamic first = foo.field; |
19 self::use(first); | 19 self::use(first); |
20 foo.noField = "string"; | 20 foo.noField = "string"; |
21 dynamic second = foo.noField; | 21 dynamic second = foo.noField; |
22 self::use(second); | 22 self::use(second); |
23 } | 23 } |
24 } | 24 } |
OLD | NEW |