blob: d0beacd4d588642fefe579305160f65d08415051 [file] [log] [blame]
// Formatted problems:
//
// 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();
// ^^^^^^^^^^^
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: 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 dynamic x = const self::Constant::•();
core::bool::fromEnvironment("fisk");
const dynamic b = const core::bool::fromEnvironment("fisk");
}
static method main() dynamic {}