mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:07:49 +00:00
ebb3dea075
R=ahe@google.com, paulberry@google.com, sigmund@google.com BUG= Review-Url: https://codereview.chromium.org/2981783002 .
25 lines
611 B
Plaintext
25 lines
611 B
Plaintext
library;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
class Foo extends core::Object {
|
|
field dynamic field = null;
|
|
default constructor •() → void
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
static method identity(dynamic x) → dynamic
|
|
return x;
|
|
static method use(dynamic x) → void {}
|
|
static method main(core::List<core::String> args) → dynamic {
|
|
dynamic foo = self::identity(new self::Foo::•());
|
|
if(args.length.>(1)) {
|
|
foo.field = "string";
|
|
dynamic first = foo.field;
|
|
self::use(first);
|
|
foo.noField = "string";
|
|
dynamic second = foo.noField;
|
|
self::use(second);
|
|
}
|
|
}
|