| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/magic_const.dart:15:9: Error: Constant expression expected. |
| // Try inserting 'const'. |
| // foo({a: Constant(), b: Constant(), c: []}) {} |
| // ^^^^^^^^ |
| // |
| // pkg/front_end/testcases/general/magic_const.dart:15:24: Error: Constant expression expected. |
| // Try inserting 'const'. |
| // foo({a: Constant(), b: Constant(), c: []}) {} |
| // ^^^^^^^^ |
| // |
| // pkg/front_end/testcases/general/magic_const.dart:15:39: Error: Constant expression expected. |
| // Try inserting 'const'. |
| // foo({a: Constant(), b: Constant(), c: []}) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/general/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 /*hasConstConstructor*/ { |
| const constructor •() → self::Constant* |
| : super core::Object::•() |
| ; |
| abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
| abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
| abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
| abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
| abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
| abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
| abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
| abstract member-signature method toString() → core::String*; -> core::Object::toString |
| abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
| abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
| } |
| class NotConstant extends core::Object { |
| synthetic constructor •() → self::NotConstant* |
| : super core::Object::•() |
| ; |
| abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
| abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
| abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
| abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
| abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
| abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
| abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
| abstract member-signature method toString() → core::String*; -> core::Object::toString |
| abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
| abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
| } |
| static method foo({dynamic a = #C1, dynamic b = #C1, dynamic c = invalid-expression "Non-constant list literal"}) → dynamic {} |
| static method test() → dynamic { |
| invalid-expression "pkg/front_end/testcases/general/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::•(); |
| core::bool::fromEnvironment("fisk"); |
| } |
| static method main() → dynamic {} |
| |
| constants { |
| #C1 = self::Constant {} |
| } |
| |
| |
| Constructor coverage from constants: |
| org-dartlang-testcase:///magic_const.dart: |
| - Constant. (from org-dartlang-testcase:///magic_const.dart:10:9) |
| - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9) |