4b7d256a06
This reverts commite9ca6a5335andd3e00fd35e. Change-Id: I346d6156be19c4fceffa202a7ce9bfa931c7c14b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99560 Reviewed-by: Sigmund Cherem <sigmund@google.com> Reviewed-by: Vijay Menon <vsm@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
library;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/magic_const.dart:18:9: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
|
|
// Try using a constructor or factory that is 'const'.
|
|
// const NotConstant();
|
|
// ^^^^^^^^^^^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
class Constant extends core::Object {
|
|
const constructor •() → self::Constant
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
class NotConstant extends core::Object {
|
|
synthetic constructor •() → self::NotConstant
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
static method foo({dynamic a = const self::Constant::•(), dynamic b = const self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
|
|
static method test() → dynamic {
|
|
invalid-expression "pkg/front_end/testcases/magic_const.dart:18:9: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
|
|
Try using a constructor or factory that is 'const'.
|
|
const NotConstant();
|
|
^^^^^^^^^^^";
|
|
new self::Constant::•();
|
|
const self::Constant x = const self::Constant::•();
|
|
core::bool::fromEnvironment("fisk");
|
|
const core::bool b = const core::bool::fromEnvironment("fisk");
|
|
}
|
|
static method main() → dynamic {}
|