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 .
37 lines
940 B
Plaintext
37 lines
940 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::•()
|
|
;
|
|
}
|
|
class FooValue extends core::Object {
|
|
default constructor •() → void
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
class Bar extends core::Object {
|
|
field dynamic _field = null;
|
|
default constructor •() → void
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
class BarValue extends core::Object {
|
|
default constructor •() → void
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
static method main() → dynamic {
|
|
self::Foo foo = new self::Foo::•();
|
|
foo.{self::Foo::_field} = new self::FooValue::•();
|
|
dynamic fooValue = foo.{self::Foo::_field};
|
|
core::print(fooValue);
|
|
self::Bar bar = new self::Bar::•();
|
|
bar.{self::Bar::_field} = new self::BarValue::•();
|
|
dynamic barValue = bar.{self::Bar::_field};
|
|
core::print(barValue);
|
|
}
|