| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments. |
| // const Map<bool> MapWithUnevaluated = { |
| // ^ |
| // |
| // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:25:26: Error: Constant evaluation error: |
| // const setNotAgnosticOK = {a, b}; |
| // ^ |
| // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:25:30: Context: Constant value is not strong/weak mode agnostic. |
| // const setNotAgnosticOK = {a, b}; |
| // ^ |
| // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:25:7: Context: While analyzing: |
| // const setNotAgnosticOK = {a, b}; |
| // ^ |
| // |
| // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:31:26: Error: Constant evaluation error: |
| // const mapNotAgnosticOK = {a: 0, b: 1}; |
| // ^ |
| // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:31:33: Context: Constant value is not strong/weak mode agnostic. |
| // const mapNotAgnosticOK = {a: 0, b: 1}; |
| // ^ |
| // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:31:7: Context: While analyzing: |
| // const mapNotAgnosticOK = {a: 0, b: 1}; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| static const field core::List<core::bool> listWithUnevaluated = #C5; |
| static const field core::List<core::bool> listWithUnevaluatedSpread = #C9; |
| static const field core::Set<core::bool> setWithUnevaluated = #C11; |
| static const field core::Set<core::bool> setWithUnevaluatedSpread = #C14; |
| static const field core::List<core::int> a = #C15; |
| static const field core::List<core::int?> b = #C16; |
| static const field core::Set<core::List<core::int?>> setNotAgnosticOK = invalid-expression "Constant value is not strong/weak mode agnostic."; |
| static const field invalid-type MapWithUnevaluated = #C18; |
| static const field core::Map<core::List<core::int?>, core::int> mapNotAgnosticOK = invalid-expression "Constant value is not strong/weak mode agnostic."; |
| static method main() → dynamic { |
| core::print(#C5); |
| core::print(#C9); |
| core::print(#C11); |
| core::print(#C14); |
| core::print(<core::String>{"hello"}); |
| core::print(#C20); |
| } |
| |
| constants { |
| #C1 = <core::bool>[] |
| #C2 = "foo" |
| #C3 = "bar" |
| #C4 = true |
| #C5 = eval #C1 + const <dynamic>[const core::bool::fromEnvironment(#C2)] + const <dynamic>[const core::bool::fromEnvironment(#C3)] + const <dynamic>[#C4] |
| #C6 = <core::bool>[#C4] |
| #C7 = false |
| #C8 = <core::bool>[#C7] |
| #C9 = eval #C6 + #C1 + const <dynamic>[const core::bool::fromEnvironment(#C2)] + const <dynamic>[const core::bool::fromEnvironment(#C3)] + const <dynamic>[#C4] + #C8 |
| #C10 = <core::bool>{} |
| #C11 = eval #C10 + const <dynamic>{const core::bool::fromEnvironment(#C2)} + const <dynamic>{const core::bool::fromEnvironment(#C3)} + const <dynamic>{#C4} |
| #C12 = <core::bool>{#C4} |
| #C13 = <core::bool>{#C7} |
| #C14 = eval #C12 + #C10 + const <dynamic>{const core::bool::fromEnvironment(#C2)} + const <dynamic>{const core::bool::fromEnvironment(#C3)} + const <dynamic>{#C4} + #C13 |
| #C15 = <core::int>[] |
| #C16 = <core::int?>[] |
| #C17 = <core::bool, core::bool>{) |
| #C18 = eval #C17 + const <dynamic, dynamic>{const core::bool::fromEnvironment(#C2): const core::bool::fromEnvironment(#C3)} |
| #C19 = "hello" |
| #C20 = <core::String>{#C19} |
| } |