0fedb9b9d8
Change-Id: If2c14bf402bbcbacbf4cf2da351eb7234e1e0944 Reviewed-on: https://dart-review.googlesource.com/49900 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Kevin Millikin <kmillikin@google.com>
26 lines
819 B
Plaintext
26 lines
819 B
Plaintext
library;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
class Constant extends core::Object {
|
|
const constructor •() → void
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
class NotConstant extends core::Object {
|
|
synthetic constructor •() → void
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
static method foo({dynamic a = new self::Constant::•(), dynamic b = new self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
|
|
static method test() → dynamic {
|
|
invalid-expression "pkg/front_end/testcases/magic_const.dart:18:9: Error: Not a const constructor.
|
|
const NotConstant();
|
|
^";
|
|
new self::Constant::•();
|
|
const dynamic x = const self::Constant::•();
|
|
core::bool::fromEnvironment("fisk");
|
|
const dynamic b = const core::bool::fromEnvironment("fisk");
|
|
}
|
|
static method main() → dynamic {}
|