blob: 2dbed60cd65b361d307a1358e12ac237bf53b157 [file] [log] [blame]
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(#C21);
core::print(#C22);
core::print(#C25);
core::print(#C26);
core::print(<core::String>{"hello"});
core::print(#C28);
}
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 = <dynamic>[]
#C20 = <dynamic>[#C4]
#C21 = eval #C1 + #C19 + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C19 + const <dynamic>[const core::bool::fromEnvironment(#C3)] + #C20
#C22 = eval #C6 + #C1 + #C19 + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C19 + const <dynamic>[const core::bool::fromEnvironment(#C3)] + #C20 + #C8
#C23 = <dynamic>{}
#C24 = <dynamic>{#C4}
#C25 = eval #C10 + #C23 + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C23 + const <dynamic>{const core::bool::fromEnvironment(#C3)} + #C24
#C26 = eval #C12 + #C10 + #C23 + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C23 + const <dynamic>{const core::bool::fromEnvironment(#C3)} + #C24 + #C13
#C27 = "hello"
#C28 = <core::String>{#C27}
}
Extra constant evaluation status:
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:5:40 -> ListConstant(const <bool>[false, false, true])
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:10:46 -> ListConstant(const <bool>[true, false, false, true, false])
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:5:40 -> ListConstant(const <bool>[false, false, true])
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:10:46 -> ListConstant(const <bool>[true, false, false, true, false])
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:27:38 -> MapConstant(const <bool, bool>{false: false})
Extra constant evaluation: evaluated: 16, effectively constant: 5