diff --git a/pkg/front_end/test/coverage_suite.dart b/pkg/front_end/test/coverage_suite.dart index ac9968864c15..0788206170a6 100644 --- a/pkg/front_end/test/coverage_suite.dart +++ b/pkg/front_end/test/coverage_suite.dart @@ -129,28 +129,25 @@ const Map _expect = { "package:front_end/src/fasta/ignored_parser_errors.dart": 100.0, "package:front_end/src/fasta/import.dart": 100.0, "package:front_end/src/fasta/import_chains.dart": 96.96969696969697, - "package:front_end/src/fasta/incremental_compiler.dart": 48.29322887520985, + "package:front_end/src/fasta/incremental_compiler.dart": 47.0, "package:front_end/src/fasta/incremental_serializer.dart": 0.0, "package:front_end/src/fasta/kernel/augmentation_lowering.dart": 100.0, "package:front_end/src/fasta/kernel/benchmarker.dart": 0.0, - "package:front_end/src/fasta/kernel/body_builder.dart": 91.12609575185435, + "package:front_end/src/fasta/kernel/body_builder.dart": 90.0, "package:front_end/src/fasta/kernel/body_builder_context.dart": 68.31501831501832, "package:front_end/src/fasta/kernel/collections.dart": 36.44736842105264, "package:front_end/src/fasta/kernel/combined_member_signature.dart": 91.29411764705883, "package:front_end/src/fasta/kernel/const_conditional_simplifier.dart": 50.0, - "package:front_end/src/fasta/kernel/constant_collection_builders.dart": - 89.23076923076924, - "package:front_end/src/fasta/kernel/constant_evaluator.dart": - 85.00106224771616, + "package:front_end/src/fasta/kernel/constant_collection_builders.dart": 64.0, + "package:front_end/src/fasta/kernel/constant_evaluator.dart": 78.0, "package:front_end/src/fasta/kernel/constant_int_folder.dart": 92.04545454545455, "package:front_end/src/fasta/kernel/constructor_tearoff_lowering.dart": 95.11278195488721, "package:front_end/src/fasta/kernel/exhaustiveness.dart": 74.57098283931357, - "package:front_end/src/fasta/kernel/expression_generator.dart": - 80.00631711939356, + "package:front_end/src/fasta/kernel/expression_generator.dart": 79.0, "package:front_end/src/fasta/kernel/expression_generator_helper.dart": 100.0, "package:front_end/src/fasta/kernel/forest.dart": 90.27777777777779, "package:front_end/src/fasta/kernel/forwarding_node.dart": 94.4927536231884, @@ -177,7 +174,7 @@ const Map _expect = { "package:front_end/src/fasta/kernel/invalid_type.dart": 74.13793103448276, "package:front_end/src/fasta/kernel/kernel_constants.dart": 45.45454545454545, "package:front_end/src/fasta/kernel/kernel_helper.dart": 98.95833333333334, - "package:front_end/src/fasta/kernel/kernel_target.dart": 79.56093868281606, + "package:front_end/src/fasta/kernel/kernel_target.dart": 78.0, "package:front_end/src/fasta/kernel/kernel_variable_builder.dart": 61.111111111111114, "package:front_end/src/fasta/kernel/late_lowering.dart": 100.0, diff --git a/pkg/front_end/testcases/agnostic/as.dart b/pkg/front_end/testcases/agnostic/as.dart deleted file mode 100644 index 3c26cd7622d9..000000000000 --- a/pkg/front_end/testcases/agnostic/as.dart +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const a = [] as List; -const b = [] as List; - -void main() {} diff --git a/pkg/front_end/testcases/agnostic/as.dart.strong.expect b/pkg/front_end/testcases/agnostic/as.dart.strong.expect deleted file mode 100644 index e35840e54e5f..000000000000 --- a/pkg/front_end/testcases/agnostic/as.dart.strong.expect +++ /dev/null @@ -1,30 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/agnostic/as.dart:5:20: Error: Constant evaluation error: -// const a = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:5:20: Context: Constant value is not strong/weak mode agnostic. -// const a = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:5:7: Context: While analyzing: -// const a = [] as List; -// ^ -// -// pkg/front_end/testcases/agnostic/as.dart:6:20: Error: Constant evaluation error: -// const b = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:6:20: Context: Constant value is not strong/weak mode agnostic. -// const b = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:6:7: Context: While analyzing: -// const b = [] as List; -// ^ -// -import self as self; -import "dart:core" as core; - -static const field core::List a = invalid-expression "Constant value is not strong/weak mode agnostic."; -static const field core::List b = invalid-expression "Constant value is not strong/weak mode agnostic."; -static method main() → void {} diff --git a/pkg/front_end/testcases/agnostic/as.dart.strong.modular.expect b/pkg/front_end/testcases/agnostic/as.dart.strong.modular.expect deleted file mode 100644 index e35840e54e5f..000000000000 --- a/pkg/front_end/testcases/agnostic/as.dart.strong.modular.expect +++ /dev/null @@ -1,30 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/agnostic/as.dart:5:20: Error: Constant evaluation error: -// const a = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:5:20: Context: Constant value is not strong/weak mode agnostic. -// const a = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:5:7: Context: While analyzing: -// const a = [] as List; -// ^ -// -// pkg/front_end/testcases/agnostic/as.dart:6:20: Error: Constant evaluation error: -// const b = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:6:20: Context: Constant value is not strong/weak mode agnostic. -// const b = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:6:7: Context: While analyzing: -// const b = [] as List; -// ^ -// -import self as self; -import "dart:core" as core; - -static const field core::List a = invalid-expression "Constant value is not strong/weak mode agnostic."; -static const field core::List b = invalid-expression "Constant value is not strong/weak mode agnostic."; -static method main() → void {} diff --git a/pkg/front_end/testcases/agnostic/as.dart.strong.outline.expect b/pkg/front_end/testcases/agnostic/as.dart.strong.outline.expect deleted file mode 100644 index 8de84fcf41e5..000000000000 --- a/pkg/front_end/testcases/agnostic/as.dart.strong.outline.expect +++ /dev/null @@ -1,14 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = const [] as core::List; -static const field core::List b = const [] as core::List; -static method main() → void - ; - - -Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///as.dart:5:17 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///as.dart:6:17 -> ListConstant(const []) -Extra constant evaluation: evaluated: 4, effectively constant: 2 diff --git a/pkg/front_end/testcases/agnostic/as.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/as.dart.strong.transformed.expect deleted file mode 100644 index e35840e54e5f..000000000000 --- a/pkg/front_end/testcases/agnostic/as.dart.strong.transformed.expect +++ /dev/null @@ -1,30 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/agnostic/as.dart:5:20: Error: Constant evaluation error: -// const a = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:5:20: Context: Constant value is not strong/weak mode agnostic. -// const a = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:5:7: Context: While analyzing: -// const a = [] as List; -// ^ -// -// pkg/front_end/testcases/agnostic/as.dart:6:20: Error: Constant evaluation error: -// const b = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:6:20: Context: Constant value is not strong/weak mode agnostic. -// const b = [] as List; -// ^ -// pkg/front_end/testcases/agnostic/as.dart:6:7: Context: While analyzing: -// const b = [] as List; -// ^ -// -import self as self; -import "dart:core" as core; - -static const field core::List a = invalid-expression "Constant value is not strong/weak mode agnostic."; -static const field core::List b = invalid-expression "Constant value is not strong/weak mode agnostic."; -static method main() → void {} diff --git a/pkg/front_end/testcases/agnostic/as.dart.textual_outline.expect b/pkg/front_end/testcases/agnostic/as.dart.textual_outline.expect deleted file mode 100644 index 613d46d64707..000000000000 --- a/pkg/front_end/testcases/agnostic/as.dart.textual_outline.expect +++ /dev/null @@ -1,5 +0,0 @@ -const a = [] as List; - -const b = [] as List; - -void main() {} diff --git a/pkg/front_end/testcases/agnostic/as.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/agnostic/as.dart.textual_outline_modelled.expect deleted file mode 100644 index 613d46d64707..000000000000 --- a/pkg/front_end/testcases/agnostic/as.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,5 +0,0 @@ -const a = [] as List; - -const b = [] as List; - -void main() {} diff --git a/pkg/front_end/testcases/agnostic/folder.options b/pkg/front_end/testcases/agnostic/folder.options deleted file mode 100644 index ae0440d5308e..000000000000 --- a/pkg/front_end/testcases/agnostic/folder.options +++ /dev/null @@ -1 +0,0 @@ ---nnbd-agnostic \ No newline at end of file diff --git a/pkg/front_end/testcases/agnostic/identical.dart b/pkg/front_end/testcases/agnostic/identical.dart deleted file mode 100644 index a51ea1e89eb2..000000000000 --- a/pkg/front_end/testcases/agnostic/identical.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const a = []; -const b = []; -const c = identical(a, b); - -main() {} diff --git a/pkg/front_end/testcases/agnostic/identical.dart.strong.expect b/pkg/front_end/testcases/agnostic/identical.dart.strong.expect deleted file mode 100644 index f36afaace13d..000000000000 --- a/pkg/front_end/testcases/agnostic/identical.dart.strong.expect +++ /dev/null @@ -1,14 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::bool c = #C3; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = false -} diff --git a/pkg/front_end/testcases/agnostic/identical.dart.strong.modular.expect b/pkg/front_end/testcases/agnostic/identical.dart.strong.modular.expect deleted file mode 100644 index f36afaace13d..000000000000 --- a/pkg/front_end/testcases/agnostic/identical.dart.strong.modular.expect +++ /dev/null @@ -1,14 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::bool c = #C3; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = false -} diff --git a/pkg/front_end/testcases/agnostic/identical.dart.strong.outline.expect b/pkg/front_end/testcases/agnostic/identical.dart.strong.outline.expect deleted file mode 100644 index 37297f3e18d6..000000000000 --- a/pkg/front_end/testcases/agnostic/identical.dart.strong.outline.expect +++ /dev/null @@ -1,16 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = const []; -static const field core::List b = const []; -static const field core::bool c = core::identical(self::a, self::b); -static method main() → dynamic - ; - - -Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///identical.dart:5:16 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///identical.dart:6:17 -> ListConstant(const []) -Evaluated: StaticInvocation @ org-dartlang-testcase:///identical.dart:7:11 -> BoolConstant(false) -Extra constant evaluation: evaluated: 3, effectively constant: 3 diff --git a/pkg/front_end/testcases/agnostic/identical.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/identical.dart.strong.transformed.expect deleted file mode 100644 index f36afaace13d..000000000000 --- a/pkg/front_end/testcases/agnostic/identical.dart.strong.transformed.expect +++ /dev/null @@ -1,14 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::bool c = #C3; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = false -} diff --git a/pkg/front_end/testcases/agnostic/identical.dart.textual_outline.expect b/pkg/front_end/testcases/agnostic/identical.dart.textual_outline.expect deleted file mode 100644 index 03a6adc0a1fb..000000000000 --- a/pkg/front_end/testcases/agnostic/identical.dart.textual_outline.expect +++ /dev/null @@ -1,7 +0,0 @@ -const a = []; - -const b = []; - -const c = identical(a, b); - -main() {} diff --git a/pkg/front_end/testcases/agnostic/identical.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/agnostic/identical.dart.textual_outline_modelled.expect deleted file mode 100644 index 03a6adc0a1fb..000000000000 --- a/pkg/front_end/testcases/agnostic/identical.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,7 +0,0 @@ -const a = []; - -const b = []; - -const c = identical(a, b); - -main() {} diff --git a/pkg/front_end/testcases/agnostic/is.dart b/pkg/front_end/testcases/agnostic/is.dart deleted file mode 100644 index 20aac80690cd..000000000000 --- a/pkg/front_end/testcases/agnostic/is.dart +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const a = [] is List; -const b = [] is List; - -void main() {} diff --git a/pkg/front_end/testcases/agnostic/is.dart.strong.expect b/pkg/front_end/testcases/agnostic/is.dart.strong.expect deleted file mode 100644 index 79ac87106cd5..000000000000 --- a/pkg/front_end/testcases/agnostic/is.dart.strong.expect +++ /dev/null @@ -1,30 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/agnostic/is.dart:5:20: Error: Constant evaluation error: -// const a = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:5:20: Context: Constant value is not strong/weak mode agnostic. -// const a = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:5:7: Context: While analyzing: -// const a = [] is List; -// ^ -// -// pkg/front_end/testcases/agnostic/is.dart:6:20: Error: Constant evaluation error: -// const b = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:6:20: Context: Constant value is not strong/weak mode agnostic. -// const b = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:6:7: Context: While analyzing: -// const b = [] is List; -// ^ -// -import self as self; -import "dart:core" as core; - -static const field core::bool a = invalid-expression "Constant value is not strong/weak mode agnostic."; -static const field core::bool b = invalid-expression "Constant value is not strong/weak mode agnostic."; -static method main() → void {} diff --git a/pkg/front_end/testcases/agnostic/is.dart.strong.modular.expect b/pkg/front_end/testcases/agnostic/is.dart.strong.modular.expect deleted file mode 100644 index 79ac87106cd5..000000000000 --- a/pkg/front_end/testcases/agnostic/is.dart.strong.modular.expect +++ /dev/null @@ -1,30 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/agnostic/is.dart:5:20: Error: Constant evaluation error: -// const a = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:5:20: Context: Constant value is not strong/weak mode agnostic. -// const a = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:5:7: Context: While analyzing: -// const a = [] is List; -// ^ -// -// pkg/front_end/testcases/agnostic/is.dart:6:20: Error: Constant evaluation error: -// const b = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:6:20: Context: Constant value is not strong/weak mode agnostic. -// const b = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:6:7: Context: While analyzing: -// const b = [] is List; -// ^ -// -import self as self; -import "dart:core" as core; - -static const field core::bool a = invalid-expression "Constant value is not strong/weak mode agnostic."; -static const field core::bool b = invalid-expression "Constant value is not strong/weak mode agnostic."; -static method main() → void {} diff --git a/pkg/front_end/testcases/agnostic/is.dart.strong.outline.expect b/pkg/front_end/testcases/agnostic/is.dart.strong.outline.expect deleted file mode 100644 index c6030d8bdcd7..000000000000 --- a/pkg/front_end/testcases/agnostic/is.dart.strong.outline.expect +++ /dev/null @@ -1,14 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::bool a = const [] is core::List; -static const field core::bool b = const [] is core::List; -static method main() → void - ; - - -Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///is.dart:5:17 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///is.dart:6:17 -> ListConstant(const []) -Extra constant evaluation: evaluated: 4, effectively constant: 2 diff --git a/pkg/front_end/testcases/agnostic/is.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/is.dart.strong.transformed.expect deleted file mode 100644 index 79ac87106cd5..000000000000 --- a/pkg/front_end/testcases/agnostic/is.dart.strong.transformed.expect +++ /dev/null @@ -1,30 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/agnostic/is.dart:5:20: Error: Constant evaluation error: -// const a = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:5:20: Context: Constant value is not strong/weak mode agnostic. -// const a = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:5:7: Context: While analyzing: -// const a = [] is List; -// ^ -// -// pkg/front_end/testcases/agnostic/is.dart:6:20: Error: Constant evaluation error: -// const b = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:6:20: Context: Constant value is not strong/weak mode agnostic. -// const b = [] is List; -// ^ -// pkg/front_end/testcases/agnostic/is.dart:6:7: Context: While analyzing: -// const b = [] is List; -// ^ -// -import self as self; -import "dart:core" as core; - -static const field core::bool a = invalid-expression "Constant value is not strong/weak mode agnostic."; -static const field core::bool b = invalid-expression "Constant value is not strong/weak mode agnostic."; -static method main() → void {} diff --git a/pkg/front_end/testcases/agnostic/is.dart.textual_outline.expect b/pkg/front_end/testcases/agnostic/is.dart.textual_outline.expect deleted file mode 100644 index cba2d3987834..000000000000 --- a/pkg/front_end/testcases/agnostic/is.dart.textual_outline.expect +++ /dev/null @@ -1,5 +0,0 @@ -const a = [] is List; - -const b = [] is List; - -void main() {} diff --git a/pkg/front_end/testcases/agnostic/is.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/agnostic/is.dart.textual_outline_modelled.expect deleted file mode 100644 index cba2d3987834..000000000000 --- a/pkg/front_end/testcases/agnostic/is.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,5 +0,0 @@ -const a = [] is List; - -const b = [] is List; - -void main() {} diff --git a/pkg/front_end/testcases/agnostic/map.dart b/pkg/front_end/testcases/agnostic/map.dart deleted file mode 100644 index 1847bf59be6e..000000000000 --- a/pkg/front_end/testcases/agnostic/map.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const a = []; -const b = []; -const c = {a: 0, b: 1}; - -main() {} diff --git a/pkg/front_end/testcases/agnostic/map.dart.strong.expect b/pkg/front_end/testcases/agnostic/map.dart.strong.expect deleted file mode 100644 index c877832a89f1..000000000000 --- a/pkg/front_end/testcases/agnostic/map.dart.strong.expect +++ /dev/null @@ -1,16 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::Map, core::int> c = #C5; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = 0 - #C4 = 1 - #C5 = , core::int>{#C1:#C3, #C2:#C4} -} diff --git a/pkg/front_end/testcases/agnostic/map.dart.strong.modular.expect b/pkg/front_end/testcases/agnostic/map.dart.strong.modular.expect deleted file mode 100644 index c877832a89f1..000000000000 --- a/pkg/front_end/testcases/agnostic/map.dart.strong.modular.expect +++ /dev/null @@ -1,16 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::Map, core::int> c = #C5; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = 0 - #C4 = 1 - #C5 = , core::int>{#C1:#C3, #C2:#C4} -} diff --git a/pkg/front_end/testcases/agnostic/map.dart.strong.outline.expect b/pkg/front_end/testcases/agnostic/map.dart.strong.outline.expect deleted file mode 100644 index 99c7676c565f..000000000000 --- a/pkg/front_end/testcases/agnostic/map.dart.strong.outline.expect +++ /dev/null @@ -1,16 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = const []; -static const field core::List b = const []; -static const field core::Map, core::int> c = const , core::int>{self::a: 0, self::b: 1}; -static method main() → dynamic - ; - - -Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///map.dart:5:16 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///map.dart:6:17 -> ListConstant(const []) -Evaluated: MapLiteral @ org-dartlang-testcase:///map.dart:7:11 -> MapConstant(const , int>{const []: 0, const []: 1}) -Extra constant evaluation: evaluated: 3, effectively constant: 3 diff --git a/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect deleted file mode 100644 index c877832a89f1..000000000000 --- a/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect +++ /dev/null @@ -1,16 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::Map, core::int> c = #C5; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = 0 - #C4 = 1 - #C5 = , core::int>{#C1:#C3, #C2:#C4} -} diff --git a/pkg/front_end/testcases/agnostic/map.dart.textual_outline.expect b/pkg/front_end/testcases/agnostic/map.dart.textual_outline.expect deleted file mode 100644 index 8b31e1c95c32..000000000000 --- a/pkg/front_end/testcases/agnostic/map.dart.textual_outline.expect +++ /dev/null @@ -1,7 +0,0 @@ -const a = []; - -const b = []; - -const c = {a: 0, b: 1}; - -main() {} diff --git a/pkg/front_end/testcases/agnostic/map.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/agnostic/map.dart.textual_outline_modelled.expect deleted file mode 100644 index 8b31e1c95c32..000000000000 --- a/pkg/front_end/testcases/agnostic/map.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,7 +0,0 @@ -const a = []; - -const b = []; - -const c = {a: 0, b: 1}; - -main() {} diff --git a/pkg/front_end/testcases/agnostic/set.dart b/pkg/front_end/testcases/agnostic/set.dart deleted file mode 100644 index 972aa295572f..000000000000 --- a/pkg/front_end/testcases/agnostic/set.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const a = []; -const b = []; -const c = {a, b}; - -main() {} diff --git a/pkg/front_end/testcases/agnostic/set.dart.strong.expect b/pkg/front_end/testcases/agnostic/set.dart.strong.expect deleted file mode 100644 index d31a2e33be3a..000000000000 --- a/pkg/front_end/testcases/agnostic/set.dart.strong.expect +++ /dev/null @@ -1,14 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::Set> c = #C3; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = >{#C1, #C2} -} diff --git a/pkg/front_end/testcases/agnostic/set.dart.strong.modular.expect b/pkg/front_end/testcases/agnostic/set.dart.strong.modular.expect deleted file mode 100644 index d31a2e33be3a..000000000000 --- a/pkg/front_end/testcases/agnostic/set.dart.strong.modular.expect +++ /dev/null @@ -1,14 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::Set> c = #C3; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = >{#C1, #C2} -} diff --git a/pkg/front_end/testcases/agnostic/set.dart.strong.outline.expect b/pkg/front_end/testcases/agnostic/set.dart.strong.outline.expect deleted file mode 100644 index 7e08a39b28b7..000000000000 --- a/pkg/front_end/testcases/agnostic/set.dart.strong.outline.expect +++ /dev/null @@ -1,16 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = const []; -static const field core::List b = const []; -static const field core::Set> c = const >{self::a, self::b}; -static method main() → dynamic - ; - - -Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///set.dart:5:16 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///set.dart:6:17 -> ListConstant(const []) -Evaluated: SetLiteral @ org-dartlang-testcase:///set.dart:7:11 -> SetConstant(const >{const [], const []}) -Extra constant evaluation: evaluated: 3, effectively constant: 3 diff --git a/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect deleted file mode 100644 index d31a2e33be3a..000000000000 --- a/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect +++ /dev/null @@ -1,14 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; -static const field core::Set> c = #C3; -static method main() → dynamic {} - -constants { - #C1 = [] - #C2 = [] - #C3 = >{#C1, #C2} -} diff --git a/pkg/front_end/testcases/agnostic/set.dart.textual_outline.expect b/pkg/front_end/testcases/agnostic/set.dart.textual_outline.expect deleted file mode 100644 index e15574f7926b..000000000000 --- a/pkg/front_end/testcases/agnostic/set.dart.textual_outline.expect +++ /dev/null @@ -1,7 +0,0 @@ -const a = []; - -const b = []; - -const c = {a, b}; - -main() {} diff --git a/pkg/front_end/testcases/agnostic/set.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/agnostic/set.dart.textual_outline_modelled.expect deleted file mode 100644 index e15574f7926b..000000000000 --- a/pkg/front_end/testcases/agnostic/set.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,7 +0,0 @@ -const a = []; - -const b = []; - -const c = {a, b}; - -main() {} diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/folder.options b/pkg/front_end/testcases/agnostic/typedef_tear_off/folder.options deleted file mode 100644 index 62f46738f528..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/folder.options +++ /dev/null @@ -1,2 +0,0 @@ ---force-constructor-tear-off-lowering=0 ---nnbd-agnostic \ No newline at end of file diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart b/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart deleted file mode 100644 index f75166fb9745..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'main_lib.dart'; - -test() { - const a = C.new; - const b = D.new; - var m = const {C.new: true, D.new: false}; - var n = const {c: true, d: false}; -} diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.expect b/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.expect deleted file mode 100644 index 7813a015ecad..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.expect +++ /dev/null @@ -1,34 +0,0 @@ -library; -import self as self; -import "dart:core" as core; -import "main_lib.dart" as mai; - -import "org-dartlang-testcase:///main_lib.dart"; - -static method test() → dynamic { - core::Map<() → mai::A, core::bool> m = #C6; - core::Map<() → mai::A, core::bool> n = #C6; -} - -library; -import self as mai; -import "dart:core" as core; - -typedef C = mai::A; -typedef D = mai::A; -class A extends core::Object { - constructor •() → mai::A - : super core::Object::•() - ; -} -static const field () → mai::A c = #C2; -static const field () → mai::A d = #C4; - -constants { - #C1 = constructor-tearoff mai::A::• - #C2 = typedef-tearoff .(#C1) - #C3 = true - #C4 = typedef-tearoff .(#C1) - #C5 = false - #C6 = <() → mai::A, core::bool>{#C2:#C3, #C4:#C5} -} diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.modular.expect b/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.modular.expect deleted file mode 100644 index 3eba588e91f3..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.modular.expect +++ /dev/null @@ -1,20 +0,0 @@ -library; -import self as self; -import "dart:core" as core; -import "main_lib.dart" as mai; - -import "org-dartlang-testcase:///main_lib.dart"; - -static method test() → dynamic { - core::Map<() → mai::A, core::bool> m = #C6; - core::Map<() → mai::A, core::bool> n = #C6; -} - -constants { - #C1 = constructor-tearoff mai::A::• - #C2 = typedef-tearoff .(#C1) - #C3 = true - #C4 = typedef-tearoff .(#C1) - #C5 = false - #C6 = <() → mai::A, core::bool>{#C2:#C3, #C4:#C5} -} diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.outline.expect b/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.outline.expect deleted file mode 100644 index 93ecb17e973f..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.outline.expect +++ /dev/null @@ -1,26 +0,0 @@ -library; -import self as self; - -import "org-dartlang-testcase:///main_lib.dart"; - -static method test() → dynamic - ; - -library; -import self as self2; -import "dart:core" as core; - -typedef C = self2::A; -typedef D = self2::A; -class A extends core::Object { - constructor •() → self2::A - ; -} -static const field () → self2::A c = #C2; -static const field () → self2::A d = #C3; - -constants { - #C1 = constructor-tearoff self2::A::• - #C2 = typedef-tearoff .(#C1) - #C3 = typedef-tearoff .(#C1) -} diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.transformed.expect deleted file mode 100644 index 7813a015ecad..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.strong.transformed.expect +++ /dev/null @@ -1,34 +0,0 @@ -library; -import self as self; -import "dart:core" as core; -import "main_lib.dart" as mai; - -import "org-dartlang-testcase:///main_lib.dart"; - -static method test() → dynamic { - core::Map<() → mai::A, core::bool> m = #C6; - core::Map<() → mai::A, core::bool> n = #C6; -} - -library; -import self as mai; -import "dart:core" as core; - -typedef C = mai::A; -typedef D = mai::A; -class A extends core::Object { - constructor •() → mai::A - : super core::Object::•() - ; -} -static const field () → mai::A c = #C2; -static const field () → mai::A d = #C4; - -constants { - #C1 = constructor-tearoff mai::A::• - #C2 = typedef-tearoff .(#C1) - #C3 = true - #C4 = typedef-tearoff .(#C1) - #C5 = false - #C6 = <() → mai::A, core::bool>{#C2:#C3, #C4:#C5} -} diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.textual_outline.expect b/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.textual_outline.expect deleted file mode 100644 index f47c60ae2df8..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.textual_outline.expect +++ /dev/null @@ -1,3 +0,0 @@ -import 'main_lib.dart'; - -test() {} diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.textual_outline_modelled.expect deleted file mode 100644 index f47c60ae2df8..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/main.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,3 +0,0 @@ -import 'main_lib.dart'; - -test() {} diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/main_lib.dart b/pkg/front_end/testcases/agnostic/typedef_tear_off/main_lib.dart deleted file mode 100644 index 8aec3df1663a..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/main_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -class A { - A(); -} - -typedef C = A; -typedef D = A; - -const c = C.new; -const d = D.new; diff --git a/pkg/front_end/testcases/agnostic/typedef_tear_off/test.options b/pkg/front_end/testcases/agnostic/typedef_tear_off/test.options deleted file mode 100644 index bfe6dc8532c2..000000000000 --- a/pkg/front_end/testcases/agnostic/typedef_tear_off/test.options +++ /dev/null @@ -1 +0,0 @@ -main_lib.dart \ No newline at end of file diff --git a/pkg/front_end/testcases/class_modifiers/mixin/mixin_class_core_libraries.dart.strong.transformed.expect b/pkg/front_end/testcases/class_modifiers/mixin/mixin_class_core_libraries.dart.strong.transformed.expect index 73b40fc228da..f1a27d53b17b 100644 --- a/pkg/front_end/testcases/class_modifiers/mixin/mixin_class_core_libraries.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/class_modifiers/mixin/mixin_class_core_libraries.dart.strong.transformed.expect @@ -67,7 +67,7 @@ abstract class _B&Object&Error extends core::Object implements core::Error /*isA static method /* from org-dartlang-sdk:///sdk/lib/core/errors.dart */ throwWithStackTrace(core::Object error, core::StackTrace stackTrace) → Never { _in::checkNotNullable(error, "error"); _in::checkNotNullable(stackTrace, "stackTrace"); - let final Never #t1 = core::Error::_throw(error, stackTrace) in throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); + core::Error::_throw(error, stackTrace); } @#C4 @#C10 diff --git a/pkg/front_end/testcases/class_modifiers/mixin/mixin_class_core_libraries_legacy.dart.strong.transformed.expect b/pkg/front_end/testcases/class_modifiers/mixin/mixin_class_core_libraries_legacy.dart.strong.transformed.expect index dd4cd2aa97b6..bf2a7eada2fb 100644 --- a/pkg/front_end/testcases/class_modifiers/mixin/mixin_class_core_libraries_legacy.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/class_modifiers/mixin/mixin_class_core_libraries_legacy.dart.strong.transformed.expect @@ -59,7 +59,7 @@ abstract class _B&Object&Error extends core::Object implements core::Error /*isA static method /* from org-dartlang-sdk:///sdk/lib/core/errors.dart */ throwWithStackTrace(core::Object error, core::StackTrace stackTrace) → Never { _in::checkNotNullable(error, "error"); _in::checkNotNullable(stackTrace, "stackTrace"); - let final Never #t1 = core::Error::_throw(error, stackTrace) in throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); + core::Error::_throw(error, stackTrace); } @#C4 @#C10 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart deleted file mode 100644 index 473c73ddd537..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -class Foo { - final int x; - const Foo(this.x) - : assert(x > 0, "x is not positive"), - assert(x > 0), - assert(const bool.fromEnvironment("foo") == false, - "foo was ${const bool.fromEnvironment("foo")}"), - assert(const bool.fromEnvironment("foo") == false); - const Foo.withMessage(this.x) - : assert(x < 0, "btw foo was ${const bool.fromEnvironment("foo")}"); - const Foo.withInvalidMessage(this.x) : assert(x < 0, x); - const Foo.withInvalidCondition(this.x) : assert(x); -} - -class Bar { - final int x; - const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); - const Bar.withoutMessage(this.x) : assert(x < 0); -} - -const Foo foo1 = const Foo(1); -const Foo foo2 = const Foo(0); -const Foo foo3 = const Foo.withMessage(42); -const Foo foo4 = const Foo.withInvalidMessage(42); -const Foo foo5 = const Foo.withInvalidCondition(42); -const Bar bar1 = const Bar.withMessage(1); -const Bar bar2 = const Bar.withMessage(0); -const Bar bar3 = const Bar.withoutMessage(1); -const Bar bar4 = const Bar.withoutMessage(0); - -main() { - print(foo1); -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.expect deleted file mode 100644 index cde41177b1a3..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.expect +++ /dev/null @@ -1,141 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. -// const Foo.withInvalidCondition(this.x) : assert(x); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:26:24: Error: Constant evaluation error: -// const Foo foo2 = const Foo(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:8:18: Context: This assertion failed with message: x is not positive -// : assert(x > 0, "x is not positive"), -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:26:11: Context: While analyzing: -// const Foo foo2 = const Foo(0); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:28:24: Error: Constant evaluation error: -// const Foo foo4 = const Foo.withInvalidMessage(42); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:15:56: Context: This assertion failed with a non-String message. -// const Foo.withInvalidMessage(this.x) : assert(x < 0, x); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:28:11: Context: While analyzing: -// const Foo foo4 = const Foo.withInvalidMessage(42); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:30:24: Error: Constant evaluation error: -// const Bar bar1 = const Bar.withMessage(1); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:21:44: Context: This assertion failed with message: x is not negative -// const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:30:11: Context: While analyzing: -// const Bar bar1 = const Bar.withMessage(1); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:31:24: Error: Constant evaluation error: -// const Bar bar2 = const Bar.withMessage(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:21:44: Context: This assertion failed with message: x is not negative -// const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:31:11: Context: While analyzing: -// const Bar bar2 = const Bar.withMessage(0); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:32:24: Error: Constant evaluation error: -// const Bar bar3 = const Bar.withoutMessage(1); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:22:47: Context: This assertion failed. -// const Bar.withoutMessage(this.x) : assert(x < 0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:32:11: Context: While analyzing: -// const Bar bar3 = const Bar.withoutMessage(1); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:33:24: Error: Constant evaluation error: -// const Bar bar4 = const Bar.withoutMessage(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:22:47: Context: This assertion failed. -// const Bar.withoutMessage(this.x) : assert(x < 0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:33:11: Context: While analyzing: -// const Bar bar4 = const Bar.withoutMessage(0); -// ^ -// -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::int x; - const constructor •(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num) → core::bool}, "x is not positive"), assert(x.{core::num::>}(0){(core::num) → core::bool}), assert(#C2 =={core::Object::==}{(core::Object) → core::bool} false, #C5), assert(#C6 =={core::Object::==}{(core::Object) → core::bool} false), super core::Object::•() - ; - const constructor withMessage(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, #C9), super core::Object::•() - ; - const constructor withInvalidMessage(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, x), super core::Object::•() - ; - const constructor withInvalidCondition(core::int x) → self::Foo - : self::Foo::x = x, assert(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. - const Foo.withInvalidCondition(this.x) : assert(x); - ^" in x as{TypeError} core::bool), super core::Object::•() - ; -} -class Bar extends core::Object /*hasConstConstructor*/ { - final field core::int x; - const constructor withMessage(core::int x) → self::Bar - : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, "x is not negative"), super core::Object::•() - ; - const constructor withoutMessage(core::int x) → self::Bar - : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}), super core::Object::•() - ; -} -static const field self::Foo foo1 = #C14; -static const field self::Foo foo2 = invalid-expression "This assertion failed with message: x is not positive"; -static const field self::Foo foo3 = #C16; -static const field self::Foo foo4 = invalid-expression "This assertion failed with a non-String message."; -static const field self::Foo foo5 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. - const Foo.withInvalidCondition(this.x) : assert(x); - ^"; -static const field self::Bar bar1 = invalid-expression "This assertion failed with message: x is not negative"; -static const field self::Bar bar2 = invalid-expression "This assertion failed with message: x is not negative"; -static const field self::Bar bar3 = invalid-expression "This assertion failed."; -static const field self::Bar bar4 = invalid-expression "This assertion failed."; -static method main() → dynamic { - core::print(#C14); -} - -constants { - #C1 = "foo" - #C2 = eval const core::bool::fromEnvironment(#C1) - #C3 = "foo was " - #C4 = eval const core::bool::fromEnvironment(#C1) - #C5 = eval "${#C3}${#C4}" - #C6 = eval const core::bool::fromEnvironment(#C1) - #C7 = "btw foo was " - #C8 = eval const core::bool::fromEnvironment(#C1) - #C9 = eval "${#C7}${#C8}" - #C10 = 1 - #C11 = false - #C12 = eval #C2 =={core::Object::==}{(core::Object) → core::bool} #C11 - #C13 = eval #C6 =={core::Object::==}{(core::Object) → core::bool} #C11 - #C14 = eval self::Foo{x:#C10, assert(#C12, #C5), assert(#C13)} - #C15 = 42 - #C16 = eval self::Foo{x:#C15, assert(#C11, #C9)} -} - - -Constructor coverage from constants: -org-dartlang-testcase:///const_asserts.dart: -- Foo. (from org-dartlang-testcase:///const_asserts.dart:7:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) -- Foo.withMessage (from org-dartlang-testcase:///const_asserts.dart:13:9) -- Foo.withInvalidMessage (from org-dartlang-testcase:///const_asserts.dart:15:9) -- Foo.withInvalidCondition (from org-dartlang-testcase:///const_asserts.dart:16:9) -- Bar.withMessage (from org-dartlang-testcase:///const_asserts.dart:21:9) -- Bar.withoutMessage (from org-dartlang-testcase:///const_asserts.dart:22:9) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.modular.expect deleted file mode 100644 index cde41177b1a3..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.modular.expect +++ /dev/null @@ -1,141 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. -// const Foo.withInvalidCondition(this.x) : assert(x); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:26:24: Error: Constant evaluation error: -// const Foo foo2 = const Foo(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:8:18: Context: This assertion failed with message: x is not positive -// : assert(x > 0, "x is not positive"), -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:26:11: Context: While analyzing: -// const Foo foo2 = const Foo(0); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:28:24: Error: Constant evaluation error: -// const Foo foo4 = const Foo.withInvalidMessage(42); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:15:56: Context: This assertion failed with a non-String message. -// const Foo.withInvalidMessage(this.x) : assert(x < 0, x); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:28:11: Context: While analyzing: -// const Foo foo4 = const Foo.withInvalidMessage(42); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:30:24: Error: Constant evaluation error: -// const Bar bar1 = const Bar.withMessage(1); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:21:44: Context: This assertion failed with message: x is not negative -// const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:30:11: Context: While analyzing: -// const Bar bar1 = const Bar.withMessage(1); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:31:24: Error: Constant evaluation error: -// const Bar bar2 = const Bar.withMessage(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:21:44: Context: This assertion failed with message: x is not negative -// const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:31:11: Context: While analyzing: -// const Bar bar2 = const Bar.withMessage(0); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:32:24: Error: Constant evaluation error: -// const Bar bar3 = const Bar.withoutMessage(1); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:22:47: Context: This assertion failed. -// const Bar.withoutMessage(this.x) : assert(x < 0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:32:11: Context: While analyzing: -// const Bar bar3 = const Bar.withoutMessage(1); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:33:24: Error: Constant evaluation error: -// const Bar bar4 = const Bar.withoutMessage(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:22:47: Context: This assertion failed. -// const Bar.withoutMessage(this.x) : assert(x < 0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:33:11: Context: While analyzing: -// const Bar bar4 = const Bar.withoutMessage(0); -// ^ -// -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::int x; - const constructor •(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num) → core::bool}, "x is not positive"), assert(x.{core::num::>}(0){(core::num) → core::bool}), assert(#C2 =={core::Object::==}{(core::Object) → core::bool} false, #C5), assert(#C6 =={core::Object::==}{(core::Object) → core::bool} false), super core::Object::•() - ; - const constructor withMessage(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, #C9), super core::Object::•() - ; - const constructor withInvalidMessage(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, x), super core::Object::•() - ; - const constructor withInvalidCondition(core::int x) → self::Foo - : self::Foo::x = x, assert(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. - const Foo.withInvalidCondition(this.x) : assert(x); - ^" in x as{TypeError} core::bool), super core::Object::•() - ; -} -class Bar extends core::Object /*hasConstConstructor*/ { - final field core::int x; - const constructor withMessage(core::int x) → self::Bar - : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, "x is not negative"), super core::Object::•() - ; - const constructor withoutMessage(core::int x) → self::Bar - : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}), super core::Object::•() - ; -} -static const field self::Foo foo1 = #C14; -static const field self::Foo foo2 = invalid-expression "This assertion failed with message: x is not positive"; -static const field self::Foo foo3 = #C16; -static const field self::Foo foo4 = invalid-expression "This assertion failed with a non-String message."; -static const field self::Foo foo5 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. - const Foo.withInvalidCondition(this.x) : assert(x); - ^"; -static const field self::Bar bar1 = invalid-expression "This assertion failed with message: x is not negative"; -static const field self::Bar bar2 = invalid-expression "This assertion failed with message: x is not negative"; -static const field self::Bar bar3 = invalid-expression "This assertion failed."; -static const field self::Bar bar4 = invalid-expression "This assertion failed."; -static method main() → dynamic { - core::print(#C14); -} - -constants { - #C1 = "foo" - #C2 = eval const core::bool::fromEnvironment(#C1) - #C3 = "foo was " - #C4 = eval const core::bool::fromEnvironment(#C1) - #C5 = eval "${#C3}${#C4}" - #C6 = eval const core::bool::fromEnvironment(#C1) - #C7 = "btw foo was " - #C8 = eval const core::bool::fromEnvironment(#C1) - #C9 = eval "${#C7}${#C8}" - #C10 = 1 - #C11 = false - #C12 = eval #C2 =={core::Object::==}{(core::Object) → core::bool} #C11 - #C13 = eval #C6 =={core::Object::==}{(core::Object) → core::bool} #C11 - #C14 = eval self::Foo{x:#C10, assert(#C12, #C5), assert(#C13)} - #C15 = 42 - #C16 = eval self::Foo{x:#C15, assert(#C11, #C9)} -} - - -Constructor coverage from constants: -org-dartlang-testcase:///const_asserts.dart: -- Foo. (from org-dartlang-testcase:///const_asserts.dart:7:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) -- Foo.withMessage (from org-dartlang-testcase:///const_asserts.dart:13:9) -- Foo.withInvalidMessage (from org-dartlang-testcase:///const_asserts.dart:15:9) -- Foo.withInvalidCondition (from org-dartlang-testcase:///const_asserts.dart:16:9) -- Bar.withMessage (from org-dartlang-testcase:///const_asserts.dart:21:9) -- Bar.withoutMessage (from org-dartlang-testcase:///const_asserts.dart:22:9) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.outline.expect deleted file mode 100644 index 1e8e2e5d579e..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.outline.expect +++ /dev/null @@ -1,61 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. -// const Foo.withInvalidCondition(this.x) : assert(x); -// ^ -// -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::int x; - const constructor •(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num) → core::bool}, "x is not positive"), assert(x.{core::num::>}(0){(core::num) → core::bool}), assert(const core::bool::fromEnvironment("foo") =={core::Object::==}{(core::Object) → core::bool} false, "foo was ${const core::bool::fromEnvironment("foo")}"), assert(const core::bool::fromEnvironment("foo") =={core::Object::==}{(core::Object) → core::bool} false), super core::Object::•() - ; - const constructor withMessage(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, "btw foo was ${const core::bool::fromEnvironment("foo")}"), super core::Object::•() - ; - const constructor withInvalidMessage(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, x), super core::Object::•() - ; - const constructor withInvalidCondition(core::int x) → self::Foo - : self::Foo::x = x, assert(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. - const Foo.withInvalidCondition(this.x) : assert(x); - ^" in x as{TypeError} core::bool), super core::Object::•() - ; -} -class Bar extends core::Object /*hasConstConstructor*/ { - final field core::int x; - const constructor withMessage(core::int x) → self::Bar - : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, "x is not negative"), super core::Object::•() - ; - const constructor withoutMessage(core::int x) → self::Bar - : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}), super core::Object::•() - ; -} -static const field self::Foo foo1 = const self::Foo::•(1); -static const field self::Foo foo2 = const self::Foo::•(0); -static const field self::Foo foo3 = const self::Foo::withMessage(42); -static const field self::Foo foo4 = const self::Foo::withInvalidMessage(42); -static const field self::Foo foo5 = const self::Foo::withInvalidCondition(42); -static const field self::Bar bar1 = const self::Bar::withMessage(1); -static const field self::Bar bar2 = const self::Bar::withMessage(0); -static const field self::Bar bar3 = const self::Bar::withoutMessage(1); -static const field self::Bar bar4 = const self::Bar::withoutMessage(0); -static method main() → dynamic - ; - - -Extra constant evaluation status: -Evaluated with empty environment: EqualsCall @ org-dartlang-testcase:///const_asserts.dart:10:50 -> BoolConstant(true) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_asserts.dart:10:22 -> BoolConstant(false) -Evaluated with empty environment: StringConcatenation @ org-dartlang-testcase:///const_asserts.dart:11:59 -> StringConstant("foo was false") -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_asserts.dart:11:30 -> BoolConstant(false) -Evaluated with empty environment: EqualsCall @ org-dartlang-testcase:///const_asserts.dart:12:50 -> BoolConstant(true) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_asserts.dart:12:22 -> BoolConstant(false) -Evaluated with empty environment: StringConcatenation @ org-dartlang-testcase:///const_asserts.dart:14:73 -> StringConstant("btw foo was false") -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_asserts.dart:14:44 -> BoolConstant(false) -Evaluated with empty environment: ConstructorInvocation @ org-dartlang-testcase:///const_asserts.dart:25:24 -> InstanceConstant(const Foo{Foo.x: 1}) -Extra constant evaluation: evaluated: 36, effectively constant: 9 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.transformed.expect deleted file mode 100644 index 0fcf1d369105..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.transformed.expect +++ /dev/null @@ -1,152 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. -// const Foo.withInvalidCondition(this.x) : assert(x); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:26:24: Error: Constant evaluation error: -// const Foo foo2 = const Foo(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:8:18: Context: This assertion failed with message: x is not positive -// : assert(x > 0, "x is not positive"), -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:26:11: Context: While analyzing: -// const Foo foo2 = const Foo(0); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:28:24: Error: Constant evaluation error: -// const Foo foo4 = const Foo.withInvalidMessage(42); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:15:56: Context: This assertion failed with a non-String message. -// const Foo.withInvalidMessage(this.x) : assert(x < 0, x); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:28:11: Context: While analyzing: -// const Foo foo4 = const Foo.withInvalidMessage(42); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:30:24: Error: Constant evaluation error: -// const Bar bar1 = const Bar.withMessage(1); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:21:44: Context: This assertion failed with message: x is not negative -// const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:30:11: Context: While analyzing: -// const Bar bar1 = const Bar.withMessage(1); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:31:24: Error: Constant evaluation error: -// const Bar bar2 = const Bar.withMessage(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:21:44: Context: This assertion failed with message: x is not negative -// const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:31:11: Context: While analyzing: -// const Bar bar2 = const Bar.withMessage(0); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:32:24: Error: Constant evaluation error: -// const Bar bar3 = const Bar.withoutMessage(1); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:22:47: Context: This assertion failed. -// const Bar.withoutMessage(this.x) : assert(x < 0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:32:11: Context: While analyzing: -// const Bar bar3 = const Bar.withoutMessage(1); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:33:24: Error: Constant evaluation error: -// const Bar bar4 = const Bar.withoutMessage(0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:22:47: Context: This assertion failed. -// const Bar.withoutMessage(this.x) : assert(x < 0); -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:33:11: Context: While analyzing: -// const Bar bar4 = const Bar.withoutMessage(0); -// ^ -// -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::int x; - const constructor •(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num) → core::bool}, "x is not positive"), assert(x.{core::num::>}(0){(core::num) → core::bool}), assert(#C2 =={core::Object::==}{(core::Object) → core::bool} false, #C5), assert(#C6 =={core::Object::==}{(core::Object) → core::bool} false), super core::Object::•() - ; - const constructor withMessage(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, #C9), super core::Object::•() - ; - const constructor withInvalidMessage(core::int x) → self::Foo - : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, x), super core::Object::•() - ; - const constructor withInvalidCondition(core::int x) → self::Foo - : self::Foo::x = x, assert(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. - const Foo.withInvalidCondition(this.x) : assert(x); - ^" in x as{TypeError} core::bool), super core::Object::•() - ; -} -class Bar extends core::Object /*hasConstConstructor*/ { - final field core::int x; - const constructor withMessage(core::int x) → self::Bar - : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, "x is not negative"), super core::Object::•() - ; - const constructor withoutMessage(core::int x) → self::Bar - : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}), super core::Object::•() - ; -} -static const field self::Foo foo1 = #C14; -static const field self::Foo foo2 = invalid-expression "This assertion failed with message: x is not positive"; -static const field self::Foo foo3 = #C16; -static const field self::Foo foo4 = invalid-expression "This assertion failed with a non-String message."; -static const field self::Foo foo5 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. - const Foo.withInvalidCondition(this.x) : assert(x); - ^"; -static const field self::Bar bar1 = invalid-expression "This assertion failed with message: x is not negative"; -static const field self::Bar bar2 = invalid-expression "This assertion failed with message: x is not negative"; -static const field self::Bar bar3 = invalid-expression "This assertion failed."; -static const field self::Bar bar4 = invalid-expression "This assertion failed."; -static method main() → dynamic { - core::print(#C14); -} - -constants { - #C1 = "foo" - #C2 = eval const core::bool::fromEnvironment(#C1) - #C3 = "foo was " - #C4 = eval const core::bool::fromEnvironment(#C1) - #C5 = eval "${#C3}${#C4}" - #C6 = eval const core::bool::fromEnvironment(#C1) - #C7 = "btw foo was " - #C8 = eval const core::bool::fromEnvironment(#C1) - #C9 = eval "${#C7}${#C8}" - #C10 = 1 - #C11 = false - #C12 = eval #C2 =={core::Object::==}{(core::Object) → core::bool} #C11 - #C13 = eval #C6 =={core::Object::==}{(core::Object) → core::bool} #C11 - #C14 = eval self::Foo{x:#C10, assert(#C12, #C5), assert(#C13)} - #C15 = 42 - #C16 = eval self::Foo{x:#C15, assert(#C11, #C9)} -} - -Extra constant evaluation status: -Evaluated with empty environment: EqualsCall @ org-dartlang-testcase:///const_asserts.dart:10:50 -> BoolConstant(true) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:10:22 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:11:59 -> StringConstant("foo was false") -Evaluated with empty environment: EqualsCall @ org-dartlang-testcase:///const_asserts.dart:12:50 -> BoolConstant(true) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:12:22 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:14:73 -> StringConstant("btw foo was false") -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:36:9 -> InstanceConstant(const Foo{Foo.x: 1}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:25:24 -> InstanceConstant(const Foo{Foo.x: 1}) -Extra constant evaluation: evaluated: 29, effectively constant: 8 - - -Constructor coverage from constants: -org-dartlang-testcase:///const_asserts.dart: -- Foo. (from org-dartlang-testcase:///const_asserts.dart:7:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) -- Foo.withMessage (from org-dartlang-testcase:///const_asserts.dart:13:9) -- Foo.withInvalidMessage (from org-dartlang-testcase:///const_asserts.dart:15:9) -- Foo.withInvalidCondition (from org-dartlang-testcase:///const_asserts.dart:16:9) -- Bar.withMessage (from org-dartlang-testcase:///const_asserts.dart:21:9) -- Bar.withoutMessage (from org-dartlang-testcase:///const_asserts.dart:22:9) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.textual_outline.expect deleted file mode 100644 index ccf189f338e6..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.textual_outline.expect +++ /dev/null @@ -1,39 +0,0 @@ -class Foo { - final int x; - const Foo(this.x) - : assert(x > 0, "x is not positive"), - assert(x > 0), - assert(const bool.fromEnvironment("foo") == false, - "foo was ${const bool.fromEnvironment("foo")}"), - assert(const bool.fromEnvironment("foo") == false); - const Foo.withMessage(this.x) - : assert(x < 0, "btw foo was ${const bool.fromEnvironment("foo")}"); - const Foo.withInvalidMessage(this.x) : assert(x < 0, x); - const Foo.withInvalidCondition(this.x) : assert(x); -} - -class Bar { - final int x; - const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); - const Bar.withoutMessage(this.x) : assert(x < 0); -} - -const Foo foo1 = const Foo(1); - -const Foo foo2 = const Foo(0); - -const Foo foo3 = const Foo.withMessage(42); - -const Foo foo4 = const Foo.withInvalidMessage(42); - -const Foo foo5 = const Foo.withInvalidCondition(42); - -const Bar bar1 = const Bar.withMessage(1); - -const Bar bar2 = const Bar.withMessage(0); - -const Bar bar3 = const Bar.withoutMessage(1); - -const Bar bar4 = const Bar.withoutMessage(0); - -main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.textual_outline_modelled.expect deleted file mode 100644 index 3a2f3a5c5099..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,39 +0,0 @@ -class Bar { - const Bar.withMessage(this.x) : assert(x < 0, "x is not negative"); - const Bar.withoutMessage(this.x) : assert(x < 0); - final int x; -} - -class Foo { - const Foo(this.x) - : assert(x > 0, "x is not positive"), - assert(x > 0), - assert(const bool.fromEnvironment("foo") == false, - "foo was ${const bool.fromEnvironment("foo")}"), - assert(const bool.fromEnvironment("foo") == false); - const Foo.withInvalidCondition(this.x) : assert(x); - const Foo.withInvalidMessage(this.x) : assert(x < 0, x); - const Foo.withMessage(this.x) - : assert(x < 0, "btw foo was ${const bool.fromEnvironment("foo")}"); - final int x; -} - -const Bar bar1 = const Bar.withMessage(1); - -const Bar bar2 = const Bar.withMessage(0); - -const Bar bar3 = const Bar.withoutMessage(1); - -const Bar bar4 = const Bar.withoutMessage(0); - -const Foo foo1 = const Foo(1); - -const Foo foo2 = const Foo(0); - -const Foo foo3 = const Foo.withMessage(42); - -const Foo foo4 = const Foo.withInvalidMessage(42); - -const Foo foo5 = const Foo.withInvalidCondition(42); - -main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart deleted file mode 100644 index d96e7e1e215f..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const List listWithUnevaluated = [ - bool.fromEnvironment("foo"), - bool.fromEnvironment("bar"), - true, -]; -const List listWithUnevaluatedSpread = [ - true, - ...listWithUnevaluated, - false -]; - -const Set setWithUnevaluated = { - bool.fromEnvironment("foo"), - bool.fromEnvironment("bar"), - true, -}; -const Set setWithUnevaluatedSpread = {true, ...setWithUnevaluated, false}; - -const a = []; -const b = []; -const setNotAgnosticOK = {a, b}; - -const Map MapWithUnevaluated = { - bool.fromEnvironment("foo"): bool.fromEnvironment("bar"), -}; - -const mapNotAgnosticOK = {a: 0, b: 1}; - -main() { - print(listWithUnevaluated); - print(listWithUnevaluatedSpread); - print(setWithUnevaluated); - print(setWithUnevaluatedSpread); - print({"hello"}); - print(const {"hello"}); -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.expect deleted file mode 100644 index d69d9be34341..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.expect +++ /dev/null @@ -1,63 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments. -// const Map MapWithUnevaluated = { -// ^^^ -// -import self as self; -import "dart:core" as core; - -static const field core::List listWithUnevaluated = #C9; -static const field core::List listWithUnevaluatedSpread = #C12; -static const field core::Set setWithUnevaluated = #C18; -static const field core::Set setWithUnevaluatedSpread = #C20; -static const field core::List a = #C21; -static const field core::List b = #C22; -static const field core::Set> setNotAgnosticOK = #C23; -static const field invalid-type MapWithUnevaluated = #C27; -static const field core::Map, core::int> mapNotAgnosticOK = #C30; -static method main() → dynamic { - core::print(#C9); - core::print(#C12); - core::print(#C18); - core::print(#C20); - core::print({"hello"}); - core::print(#C32); -} - -constants { - #C1 = "foo" - #C2 = eval const core::bool::fromEnvironment(#C1) - #C3 = eval const [#C2] - #C4 = "bar" - #C5 = eval const core::bool::fromEnvironment(#C4) - #C6 = eval const [#C5] - #C7 = true - #C8 = [#C7] - #C9 = eval #C3 + #C6 + #C8 - #C10 = false - #C11 = [#C10] - #C12 = eval #C8 + #C9 + #C11 - #C13 = eval const core::bool::fromEnvironment(#C1) - #C14 = eval const {#C13} - #C15 = eval const core::bool::fromEnvironment(#C4) - #C16 = eval const {#C15} - #C17 = {#C7} - #C18 = eval #C14 + #C16 + #C17 - #C19 = {#C10} - #C20 = eval #C17 + #C18 + #C19 - #C21 = [] - #C22 = [] - #C23 = >{#C21, #C22} - #C24 = eval const core::bool::fromEnvironment(#C1) - #C25 = eval const core::bool::fromEnvironment(#C4) - #C26 = eval const {#C24: #C25} - #C27 = eval #C26 - #C28 = 0 - #C29 = 1 - #C30 = , core::int>{#C21:#C28, #C22:#C29} - #C31 = "hello" - #C32 = {#C31} -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.modular.expect deleted file mode 100644 index d69d9be34341..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.modular.expect +++ /dev/null @@ -1,63 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments. -// const Map MapWithUnevaluated = { -// ^^^ -// -import self as self; -import "dart:core" as core; - -static const field core::List listWithUnevaluated = #C9; -static const field core::List listWithUnevaluatedSpread = #C12; -static const field core::Set setWithUnevaluated = #C18; -static const field core::Set setWithUnevaluatedSpread = #C20; -static const field core::List a = #C21; -static const field core::List b = #C22; -static const field core::Set> setNotAgnosticOK = #C23; -static const field invalid-type MapWithUnevaluated = #C27; -static const field core::Map, core::int> mapNotAgnosticOK = #C30; -static method main() → dynamic { - core::print(#C9); - core::print(#C12); - core::print(#C18); - core::print(#C20); - core::print({"hello"}); - core::print(#C32); -} - -constants { - #C1 = "foo" - #C2 = eval const core::bool::fromEnvironment(#C1) - #C3 = eval const [#C2] - #C4 = "bar" - #C5 = eval const core::bool::fromEnvironment(#C4) - #C6 = eval const [#C5] - #C7 = true - #C8 = [#C7] - #C9 = eval #C3 + #C6 + #C8 - #C10 = false - #C11 = [#C10] - #C12 = eval #C8 + #C9 + #C11 - #C13 = eval const core::bool::fromEnvironment(#C1) - #C14 = eval const {#C13} - #C15 = eval const core::bool::fromEnvironment(#C4) - #C16 = eval const {#C15} - #C17 = {#C7} - #C18 = eval #C14 + #C16 + #C17 - #C19 = {#C10} - #C20 = eval #C17 + #C18 + #C19 - #C21 = [] - #C22 = [] - #C23 = >{#C21, #C22} - #C24 = eval const core::bool::fromEnvironment(#C1) - #C25 = eval const core::bool::fromEnvironment(#C4) - #C26 = eval const {#C24: #C25} - #C27 = eval #C26 - #C28 = 0 - #C29 = 1 - #C30 = , core::int>{#C21:#C28, #C22:#C29} - #C31 = "hello" - #C32 = {#C31} -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.outline.expect deleted file mode 100644 index a72415d00461..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.outline.expect +++ /dev/null @@ -1,44 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments. -// const Map MapWithUnevaluated = { -// ^^^ -// -import self as self; -import "dart:core" as core; - -static const field core::List listWithUnevaluated = const [const core::bool::fromEnvironment("foo"), const core::bool::fromEnvironment("bar"), true]; -static const field core::List listWithUnevaluatedSpread = const [true] + self::listWithUnevaluated + const [false]; -static const field core::Set setWithUnevaluated = const {const core::bool::fromEnvironment("foo"), const core::bool::fromEnvironment("bar"), true}; -static const field core::Set setWithUnevaluatedSpread = const {true} + self::setWithUnevaluated + const {false}; -static const field core::List a = const []; -static const field core::List b = const []; -static const field core::Set> setNotAgnosticOK = const >{self::a, self::b}; -static const field invalid-type MapWithUnevaluated = const {const core::bool::fromEnvironment("foo"): const core::bool::fromEnvironment("bar")}; -static const field core::Map, core::int> mapNotAgnosticOK = const , core::int>{self::a: 0, self::b: 1}; -static method main() → dynamic - ; - - -Extra constant evaluation status: -Evaluated with empty environment: ListLiteral @ org-dartlang-testcase:///const_collections.dart:5:40 -> ListConstant(const [false, false, true]) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:6:8 -> BoolConstant(false) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:7:8 -> BoolConstant(false) -Evaluated with empty environment: ListConcatenation @ org-dartlang-testcase:///const_collections.dart:10:46 -> ListConstant(const [true, false, false, true, false]) -Evaluated: ListLiteral @ org-dartlang-testcase:///const_collections.dart:10:46 -> ListConstant(const [true]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///const_collections.dart:12:6 -> ListConstant(const [false, false, true]) -Evaluated: ListLiteral @ org-dartlang-testcase:///const_collections.dart:10:46 -> ListConstant(const [false]) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:17:8 -> BoolConstant(false) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:18:8 -> BoolConstant(false) -Evaluated: SetLiteral @ org-dartlang-testcase:///const_collections.dart:21:44 -> SetConstant(const {true}) -Evaluated: SetLiteral @ org-dartlang-testcase:///const_collections.dart:21:44 -> SetConstant(const {false}) -Evaluated: ListLiteral @ org-dartlang-testcase:///const_collections.dart:23:16 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///const_collections.dart:24:17 -> ListConstant(const []) -Evaluated: SetLiteral @ org-dartlang-testcase:///const_collections.dart:25:26 -> SetConstant(const >{const [], const []}) -Evaluated with empty environment: MapLiteral @ org-dartlang-testcase:///const_collections.dart:27:38 -> MapConstant(const {false: false}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:28:8 -> BoolConstant(false) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:28:37 -> BoolConstant(false) -Evaluated: MapLiteral @ org-dartlang-testcase:///const_collections.dart:31:26 -> MapConstant(const , int>{const []: 0, const []: 1}) -Extra constant evaluation: evaluated: 21, effectively constant: 18 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.transformed.expect deleted file mode 100644 index 0f38f91bdaef..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.transformed.expect +++ /dev/null @@ -1,71 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments. -// const Map MapWithUnevaluated = { -// ^^^ -// -import self as self; -import "dart:core" as core; - -static const field core::List listWithUnevaluated = #C9; -static const field core::List listWithUnevaluatedSpread = #C12; -static const field core::Set setWithUnevaluated = #C18; -static const field core::Set setWithUnevaluatedSpread = #C20; -static const field core::List a = #C21; -static const field core::List b = #C22; -static const field core::Set> setNotAgnosticOK = #C23; -static const field invalid-type MapWithUnevaluated = #C27; -static const field core::Map, core::int> mapNotAgnosticOK = #C30; -static method main() → dynamic { - core::print(#C9); - core::print(#C12); - core::print(#C18); - core::print(#C20); - core::print({"hello"}); - core::print(#C32); -} - -constants { - #C1 = "foo" - #C2 = eval const core::bool::fromEnvironment(#C1) - #C3 = eval const [#C2] - #C4 = "bar" - #C5 = eval const core::bool::fromEnvironment(#C4) - #C6 = eval const [#C5] - #C7 = true - #C8 = [#C7] - #C9 = eval #C3 + #C6 + #C8 - #C10 = false - #C11 = [#C10] - #C12 = eval #C8 + #C9 + #C11 - #C13 = eval const core::bool::fromEnvironment(#C1) - #C14 = eval const {#C13} - #C15 = eval const core::bool::fromEnvironment(#C4) - #C16 = eval const {#C15} - #C17 = {#C7} - #C18 = eval #C14 + #C16 + #C17 - #C19 = {#C10} - #C20 = eval #C17 + #C18 + #C19 - #C21 = [] - #C22 = [] - #C23 = >{#C21, #C22} - #C24 = eval const core::bool::fromEnvironment(#C1) - #C25 = eval const core::bool::fromEnvironment(#C4) - #C26 = eval const {#C24: #C25} - #C27 = eval #C26 - #C28 = 0 - #C29 = 1 - #C30 = , core::int>{#C21:#C28, #C22:#C29} - #C31 = "hello" - #C32 = {#C31} -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:34:9 -> ListConstant(const [false, false, true]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:35:9 -> ListConstant(const [true, false, false, true, false]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:5:40 -> ListConstant(const [false, false, true]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:10:46 -> ListConstant(const [true, false, false, true, false]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:27:38 -> MapConstant(const {false: false}) -Extra constant evaluation: evaluated: 16, effectively constant: 5 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.textual_outline.expect deleted file mode 100644 index 2494976d8608..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.textual_outline.expect +++ /dev/null @@ -1,33 +0,0 @@ -const List listWithUnevaluated = [ - bool.fromEnvironment("foo"), - bool.fromEnvironment("bar"), - true, -]; - -const List listWithUnevaluatedSpread = [ - true, - ...listWithUnevaluated, - false -]; - -const Set setWithUnevaluated = { - bool.fromEnvironment("foo"), - bool.fromEnvironment("bar"), - true, -}; - -const Set setWithUnevaluatedSpread = {true, ...setWithUnevaluated, false}; - -const a = []; - -const b = []; - -const setNotAgnosticOK = {a, b}; - -const Map MapWithUnevaluated = { - bool.fromEnvironment("foo"): bool.fromEnvironment("bar"), -}; - -const mapNotAgnosticOK = {a: 0, b: 1}; - -main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.textual_outline_modelled.expect deleted file mode 100644 index 42b9eb376741..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,33 +0,0 @@ -const List listWithUnevaluated = [ - bool.fromEnvironment("foo"), - bool.fromEnvironment("bar"), - true, -]; - -const List listWithUnevaluatedSpread = [ - true, - ...listWithUnevaluated, - false -]; - -const Map MapWithUnevaluated = { - bool.fromEnvironment("foo"): bool.fromEnvironment("bar"), -}; - -const Set setWithUnevaluated = { - bool.fromEnvironment("foo"), - bool.fromEnvironment("bar"), - true, -}; - -const Set setWithUnevaluatedSpread = {true, ...setWithUnevaluated, false}; - -const a = []; - -const b = []; - -const mapNotAgnosticOK = {a: 0, b: 1}; - -const setNotAgnosticOK = {a, b}; - -main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart deleted file mode 100644 index 050fc2333646..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const List listWithUnevaluatedUnevaluatedFirst = [ - String.fromEnvironment("foo"), - String.fromEnvironment("bar"), - "hello", - "world" -]; - -const List listWithUnevaluatedUnevaluatedMiddle = [ - "A", - "few", - "strings", - String.fromEnvironment("foo"), - String.fromEnvironment("bar"), - "hello", - "world", - "and", - "more" -]; - -const Set setWithUnevaluatedUnevaluatedFirst = { - // only one or the empty string (when evaluated with an empty environment) - // will conflict! - String.fromEnvironment("foo"), - "hello", - "world" -}; - -const Set setWithUnevaluatedUnevaluatedMiddle = { - "A", - "few", - "strings", - // only one or the empty string (when evaluated with an empty environment) - // will conflict! - String.fromEnvironment("foo"), - "hello", - "world", - "and", - "more" -}; - -const Map mapWithUnevaluatedUnevaluatedFirst = { - // only one or the empty string (when evaluated with an empty environment) - // will conflict! - String.fromEnvironment("foo"): 42, - "hello": 42, - "world": 42 -}; - -const Map mapWithUnevaluatedUnevaluatedMiddle = { - "A": 42, - "few": 42, - "strings": 42, - // only one or the empty string (when evaluated with an empty environment) - // will conflict! - String.fromEnvironment("foo"): 42, - "hello": 42, - "world": 42, - "and": 42, - "more": 42 -}; diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.expect deleted file mode 100644 index e7d944728e8d..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.expect +++ /dev/null @@ -1,54 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List listWithUnevaluatedUnevaluatedFirst = #C10; -static const field core::List listWithUnevaluatedUnevaluatedMiddle = #C22; -static const field core::Set setWithUnevaluatedUnevaluatedFirst = #C26; -static const field core::Set setWithUnevaluatedUnevaluatedMiddle = #C31; -static const field core::Map mapWithUnevaluatedUnevaluatedFirst = #C36; -static const field core::Map mapWithUnevaluatedUnevaluatedMiddle = #C41; - -constants { - #C1 = "foo" - #C2 = eval const core::String::fromEnvironment(#C1) - #C3 = eval const [#C2] - #C4 = "bar" - #C5 = eval const core::String::fromEnvironment(#C4) - #C6 = eval const [#C5] - #C7 = "hello" - #C8 = "world" - #C9 = [#C7, #C8] - #C10 = eval #C3 + #C6 + #C9 - #C11 = "A" - #C12 = "few" - #C13 = "strings" - #C14 = [#C11, #C12, #C13] - #C15 = eval const core::String::fromEnvironment(#C1) - #C16 = eval const [#C15] - #C17 = eval const core::String::fromEnvironment(#C4) - #C18 = eval const [#C17] - #C19 = "and" - #C20 = "more" - #C21 = [#C7, #C8, #C19, #C20] - #C22 = eval #C14 + #C16 + #C18 + #C21 - #C23 = eval const core::String::fromEnvironment(#C1) - #C24 = eval const {#C23} - #C25 = {#C7, #C8} - #C26 = eval #C24 + #C25 - #C27 = {#C11, #C12, #C13} - #C28 = eval const core::String::fromEnvironment(#C1) - #C29 = eval const {#C28} - #C30 = {#C7, #C8, #C19, #C20} - #C31 = eval #C27 + #C29 + #C30 - #C32 = eval const core::String::fromEnvironment(#C1) - #C33 = 42 - #C34 = eval const {#C32: #C33} - #C35 = {#C7:#C33, #C8:#C33} - #C36 = eval #C34 + #C35 - #C37 = {#C11:#C33, #C12:#C33, #C13:#C33} - #C38 = eval const core::String::fromEnvironment(#C1) - #C39 = eval const {#C38: #C33} - #C40 = {#C7:#C33, #C8:#C33, #C19:#C33, #C20:#C33} - #C41 = eval #C37 + #C39 + #C40 -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.modular.expect deleted file mode 100644 index e7d944728e8d..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.modular.expect +++ /dev/null @@ -1,54 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List listWithUnevaluatedUnevaluatedFirst = #C10; -static const field core::List listWithUnevaluatedUnevaluatedMiddle = #C22; -static const field core::Set setWithUnevaluatedUnevaluatedFirst = #C26; -static const field core::Set setWithUnevaluatedUnevaluatedMiddle = #C31; -static const field core::Map mapWithUnevaluatedUnevaluatedFirst = #C36; -static const field core::Map mapWithUnevaluatedUnevaluatedMiddle = #C41; - -constants { - #C1 = "foo" - #C2 = eval const core::String::fromEnvironment(#C1) - #C3 = eval const [#C2] - #C4 = "bar" - #C5 = eval const core::String::fromEnvironment(#C4) - #C6 = eval const [#C5] - #C7 = "hello" - #C8 = "world" - #C9 = [#C7, #C8] - #C10 = eval #C3 + #C6 + #C9 - #C11 = "A" - #C12 = "few" - #C13 = "strings" - #C14 = [#C11, #C12, #C13] - #C15 = eval const core::String::fromEnvironment(#C1) - #C16 = eval const [#C15] - #C17 = eval const core::String::fromEnvironment(#C4) - #C18 = eval const [#C17] - #C19 = "and" - #C20 = "more" - #C21 = [#C7, #C8, #C19, #C20] - #C22 = eval #C14 + #C16 + #C18 + #C21 - #C23 = eval const core::String::fromEnvironment(#C1) - #C24 = eval const {#C23} - #C25 = {#C7, #C8} - #C26 = eval #C24 + #C25 - #C27 = {#C11, #C12, #C13} - #C28 = eval const core::String::fromEnvironment(#C1) - #C29 = eval const {#C28} - #C30 = {#C7, #C8, #C19, #C20} - #C31 = eval #C27 + #C29 + #C30 - #C32 = eval const core::String::fromEnvironment(#C1) - #C33 = 42 - #C34 = eval const {#C32: #C33} - #C35 = {#C7:#C33, #C8:#C33} - #C36 = eval #C34 + #C35 - #C37 = {#C11:#C33, #C12:#C33, #C13:#C33} - #C38 = eval const core::String::fromEnvironment(#C1) - #C39 = eval const {#C38: #C33} - #C40 = {#C7:#C33, #C8:#C33, #C19:#C33, #C20:#C33} - #C41 = eval #C37 + #C39 + #C40 -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.outline.expect deleted file mode 100644 index 88f79b94aa69..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.outline.expect +++ /dev/null @@ -1,28 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List listWithUnevaluatedUnevaluatedFirst = const [const core::String::fromEnvironment("foo"), const core::String::fromEnvironment("bar"), "hello", "world"]; -static const field core::List listWithUnevaluatedUnevaluatedMiddle = const ["A", "few", "strings", const core::String::fromEnvironment("foo"), const core::String::fromEnvironment("bar"), "hello", "world", "and", "more"]; -static const field core::Set setWithUnevaluatedUnevaluatedFirst = const {const core::String::fromEnvironment("foo"), "hello", "world"}; -static const field core::Set setWithUnevaluatedUnevaluatedMiddle = const {"A", "few", "strings", const core::String::fromEnvironment("foo"), "hello", "world", "and", "more"}; -static const field core::Map mapWithUnevaluatedUnevaluatedFirst = const {const core::String::fromEnvironment("foo"): 42, "hello": 42, "world": 42}; -static const field core::Map mapWithUnevaluatedUnevaluatedMiddle = const {"A": 42, "few": 42, "strings": 42, const core::String::fromEnvironment("foo"): 42, "hello": 42, "world": 42, "and": 42, "more": 42}; - - -Extra constant evaluation status: -Evaluated with empty environment: ListLiteral @ org-dartlang-testcase:///const_collections_2.dart:5:58 -> ListConstant(const ["", "", "hello", "world"]) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections_2.dart:6:10 -> StringConstant("") -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections_2.dart:7:10 -> StringConstant("") -Evaluated with empty environment: ListLiteral @ org-dartlang-testcase:///const_collections_2.dart:12:59 -> ListConstant(const ["A", "few", "strings", "", "", "hello", "world", "and", "more"]) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections_2.dart:16:10 -> StringConstant("") -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections_2.dart:17:10 -> StringConstant("") -Evaluated with empty environment: SetLiteral @ org-dartlang-testcase:///const_collections_2.dart:24:56 -> SetConstant(const {"", "hello", "world"}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections_2.dart:27:10 -> StringConstant("") -Evaluated with empty environment: SetLiteral @ org-dartlang-testcase:///const_collections_2.dart:32:57 -> SetConstant(const {"A", "few", "strings", "", "hello", "world", "and", "more"}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections_2.dart:38:10 -> StringConstant("") -Evaluated with empty environment: MapLiteral @ org-dartlang-testcase:///const_collections_2.dart:45:61 -> MapConstant(const {"": 42, "hello": 42, "world": 42}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections_2.dart:48:10 -> StringConstant("") -Evaluated with empty environment: MapLiteral @ org-dartlang-testcase:///const_collections_2.dart:53:62 -> MapConstant(const {"A": 42, "few": 42, "strings": 42, "": 42, "hello": 42, "world": 42, "and": 42, "more": 42}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///const_collections_2.dart:59:10 -> StringConstant("") -Extra constant evaluation: evaluated: 14, effectively constant: 14 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.transformed.expect deleted file mode 100644 index e0f4f54624bf..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.strong.transformed.expect +++ /dev/null @@ -1,63 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List listWithUnevaluatedUnevaluatedFirst = #C10; -static const field core::List listWithUnevaluatedUnevaluatedMiddle = #C22; -static const field core::Set setWithUnevaluatedUnevaluatedFirst = #C26; -static const field core::Set setWithUnevaluatedUnevaluatedMiddle = #C31; -static const field core::Map mapWithUnevaluatedUnevaluatedFirst = #C36; -static const field core::Map mapWithUnevaluatedUnevaluatedMiddle = #C41; - -constants { - #C1 = "foo" - #C2 = eval const core::String::fromEnvironment(#C1) - #C3 = eval const [#C2] - #C4 = "bar" - #C5 = eval const core::String::fromEnvironment(#C4) - #C6 = eval const [#C5] - #C7 = "hello" - #C8 = "world" - #C9 = [#C7, #C8] - #C10 = eval #C3 + #C6 + #C9 - #C11 = "A" - #C12 = "few" - #C13 = "strings" - #C14 = [#C11, #C12, #C13] - #C15 = eval const core::String::fromEnvironment(#C1) - #C16 = eval const [#C15] - #C17 = eval const core::String::fromEnvironment(#C4) - #C18 = eval const [#C17] - #C19 = "and" - #C20 = "more" - #C21 = [#C7, #C8, #C19, #C20] - #C22 = eval #C14 + #C16 + #C18 + #C21 - #C23 = eval const core::String::fromEnvironment(#C1) - #C24 = eval const {#C23} - #C25 = {#C7, #C8} - #C26 = eval #C24 + #C25 - #C27 = {#C11, #C12, #C13} - #C28 = eval const core::String::fromEnvironment(#C1) - #C29 = eval const {#C28} - #C30 = {#C7, #C8, #C19, #C20} - #C31 = eval #C27 + #C29 + #C30 - #C32 = eval const core::String::fromEnvironment(#C1) - #C33 = 42 - #C34 = eval const {#C32: #C33} - #C35 = {#C7:#C33, #C8:#C33} - #C36 = eval #C34 + #C35 - #C37 = {#C11:#C33, #C12:#C33, #C13:#C33} - #C38 = eval const core::String::fromEnvironment(#C1) - #C39 = eval const {#C38: #C33} - #C40 = {#C7:#C33, #C8:#C33, #C19:#C33, #C20:#C33} - #C41 = eval #C37 + #C39 + #C40 -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections_2.dart:5:58 -> ListConstant(const ["", "", "hello", "world"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections_2.dart:12:59 -> ListConstant(const ["A", "few", "strings", "", "", "hello", "world", "and", "more"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections_2.dart:24:56 -> SetConstant(const {"", "hello", "world"}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections_2.dart:32:57 -> SetConstant(const {"A", "few", "strings", "", "hello", "world", "and", "more"}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections_2.dart:45:61 -> MapConstant(const {"": 42, "hello": 42, "world": 42}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections_2.dart:53:62 -> MapConstant(const {"A": 42, "few": 42, "strings": 42, "": 42, "hello": 42, "world": 42, "and": 42, "more": 42}) -Extra constant evaluation: evaluated: 6, effectively constant: 6 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.textual_outline.expect deleted file mode 100644 index 5dbd141753a7..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.textual_outline.expect +++ /dev/null @@ -1,52 +0,0 @@ -const List listWithUnevaluatedUnevaluatedFirst = [ - String.fromEnvironment("foo"), - String.fromEnvironment("bar"), - "hello", - "world" -]; - -const List listWithUnevaluatedUnevaluatedMiddle = [ - "A", - "few", - "strings", - String.fromEnvironment("foo"), - String.fromEnvironment("bar"), - "hello", - "world", - "and", - "more" -]; - -const Set setWithUnevaluatedUnevaluatedFirst = { - String.fromEnvironment("foo"), - "hello", - "world" -}; - -const Set setWithUnevaluatedUnevaluatedMiddle = { - "A", - "few", - "strings", - String.fromEnvironment("foo"), - "hello", - "world", - "and", - "more" -}; - -const Map mapWithUnevaluatedUnevaluatedFirst = { - String.fromEnvironment("foo"): 42, - "hello": 42, - "world": 42 -}; - -const Map mapWithUnevaluatedUnevaluatedMiddle = { - "A": 42, - "few": 42, - "strings": 42, - String.fromEnvironment("foo"): 42, - "hello": 42, - "world": 42, - "and": 42, - "more": 42 -}; diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.textual_outline_modelled.expect deleted file mode 100644 index b4c20c45167d..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,52 +0,0 @@ -const List listWithUnevaluatedUnevaluatedFirst = [ - String.fromEnvironment("foo"), - String.fromEnvironment("bar"), - "hello", - "world" -]; - -const List listWithUnevaluatedUnevaluatedMiddle = [ - "A", - "few", - "strings", - String.fromEnvironment("foo"), - String.fromEnvironment("bar"), - "hello", - "world", - "and", - "more" -]; - -const Map mapWithUnevaluatedUnevaluatedFirst = { - String.fromEnvironment("foo"): 42, - "hello": 42, - "world": 42 -}; - -const Map mapWithUnevaluatedUnevaluatedMiddle = { - "A": 42, - "few": 42, - "strings": 42, - String.fromEnvironment("foo"): 42, - "hello": 42, - "world": 42, - "and": 42, - "more": 42 -}; - -const Set setWithUnevaluatedUnevaluatedFirst = { - String.fromEnvironment("foo"), - "hello", - "world" -}; - -const Set setWithUnevaluatedUnevaluatedMiddle = { - "A", - "few", - "strings", - String.fromEnvironment("foo"), - "hello", - "world", - "and", - "more" -}; diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/folder.options b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/folder.options deleted file mode 100644 index 85995cad9a46..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/folder.options +++ /dev/null @@ -1,4 +0,0 @@ ---no-defines ---target=none ---no-verify ---nnbd-agnostic \ No newline at end of file diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart deleted file mode 100644 index 67b89d08c04f..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -class Foo { - const Foo(T Function(String)? foo) : _foo = foo ?? bar; - final T Function(String) _foo; -} - -T bar(String o) => o as T; - -void main() { - const Foo myValue = Foo( - bool.fromEnvironment("baz") ? int.parse : null, - ); -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.expect deleted file mode 100644 index 6bf6bbee5cd6..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.expect +++ /dev/null @@ -1,34 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field (core::String) → self::Foo::T% _foo; - const constructor •((core::String) →? self::Foo::T% foo) → self::Foo - : self::Foo::_foo = let final (core::String) →? self::Foo::T% #t1 = foo in #t1 == null ?{(core::String) → self::Foo::T%} #C1 : #t1{(core::String) → self::Foo::T%}, super core::Object::•() - ; -} -static method bar(core::String o) → self::bar::T% - return o as self::bar::T%; -static method main() → void { - const self::Foo myValue = #C10; -} - -constants { - #C1 = static-tearoff self::bar - #C2 = "baz" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = static-tearoff core::int::parse - #C5 = null - #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C7 = eval #C6 == null - #C8 = eval #C1 - #C9 = eval #C7 ?{(core::String) → core::int} #C8 : #C6 - #C10 = eval self::Foo{_foo:#C9} -} - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245.dart: -- Foo. (from org-dartlang-testcase:///issue_49245.dart:6:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.modular.expect deleted file mode 100644 index 6bf6bbee5cd6..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.modular.expect +++ /dev/null @@ -1,34 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field (core::String) → self::Foo::T% _foo; - const constructor •((core::String) →? self::Foo::T% foo) → self::Foo - : self::Foo::_foo = let final (core::String) →? self::Foo::T% #t1 = foo in #t1 == null ?{(core::String) → self::Foo::T%} #C1 : #t1{(core::String) → self::Foo::T%}, super core::Object::•() - ; -} -static method bar(core::String o) → self::bar::T% - return o as self::bar::T%; -static method main() → void { - const self::Foo myValue = #C10; -} - -constants { - #C1 = static-tearoff self::bar - #C2 = "baz" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = static-tearoff core::int::parse - #C5 = null - #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C7 = eval #C6 == null - #C8 = eval #C1 - #C9 = eval #C7 ?{(core::String) → core::int} #C8 : #C6 - #C10 = eval self::Foo{_foo:#C9} -} - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245.dart: -- Foo. (from org-dartlang-testcase:///issue_49245.dart:6:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.outline.expect deleted file mode 100644 index 54a4765d0bbf..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.outline.expect +++ /dev/null @@ -1,19 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field (core::String) → self::Foo::T% _foo; - const constructor •((core::String) →? self::Foo::T% foo) → self::Foo - : self::Foo::_foo = let final (core::String) →? self::Foo::T% #t1 = foo in #t1 == null ?{(core::String) → self::Foo::T%} self::bar : #t1{(core::String) → self::Foo::T%}, super core::Object::•() - ; -} -static method bar(core::String o) → self::bar::T% - ; -static method main() → void - ; - - -Extra constant evaluation status: -Evaluated: StaticTearOff @ org-dartlang-testcase:///issue_49245.dart:6:54 -> StaticTearOffConstant(bar) -Extra constant evaluation: evaluated: 8, effectively constant: 1 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.transformed.expect deleted file mode 100644 index 5edffed3d70a..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.strong.transformed.expect +++ /dev/null @@ -1,38 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field (core::String) → self::Foo::T% _foo; - const constructor •((core::String) →? self::Foo::T% foo) → self::Foo - : self::Foo::_foo = let final (core::String) →? self::Foo::T% #t1 = foo in #t1 == null ?{(core::String) → self::Foo::T%} #C1 : #t1{(core::String) → self::Foo::T%}, super core::Object::•() - ; -} -static method bar(core::String o) → self::bar::T% - return o as self::bar::T%; -static method main() → void { - const self::Foo myValue = #C10; -} - -constants { - #C1 = static-tearoff self::bar - #C2 = "baz" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = static-tearoff core::int::parse - #C5 = null - #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C7 = eval #C6 == null - #C8 = eval #C1 - #C9 = eval #C7 ?{(core::String) → core::int} #C8 : #C6 - #C10 = eval self::Foo{_foo:#C9} -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245.dart:13:28 -> InstanceConstant(const Foo{Foo._foo: bar}) -Extra constant evaluation: evaluated: 10, effectively constant: 1 - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245.dart: -- Foo. (from org-dartlang-testcase:///issue_49245.dart:6:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.textual_outline.expect deleted file mode 100644 index 62d1aaed34f6..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.textual_outline.expect +++ /dev/null @@ -1,8 +0,0 @@ -class Foo { - const Foo(T Function(String)? foo) : _foo = foo ?? bar; - final T Function(String) _foo; -} - -T bar(String o) => o as T; - -void main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.textual_outline_modelled.expect deleted file mode 100644 index bd416b564c8d..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,8 +0,0 @@ -T bar(String o) => o as T; - -class Foo { - const Foo(T Function(String)? foo) : _foo = foo ?? bar; - final T Function(String) _foo; -} - -void main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart deleted file mode 100644 index b0fb40c3362f..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -class Foo { - final List foo; - const Foo(List x) : foo = x is List ? const [1] : const [2]; -} - -main() { - const Foo foo = const Foo(bool.fromEnvironment("foo") ? [1] : [2]); - print(foo); - print(foo); -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.expect deleted file mode 100644 index 191035e0a533..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.expect +++ /dev/null @@ -1,38 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::List foo; - const constructor •(core::List x) → self::Foo - : self::Foo::foo = x is core::List ?{core::List} #C2 : #C4, super core::Object::•() - ; -} -static method main() → dynamic { - const self::Foo foo = #C14; - core::print(#C14); - core::print(#C14); -} - -constants { - #C1 = 1 - #C2 = [#C1] - #C3 = 2 - #C4 = [#C3] - #C5 = "foo" - #C6 = eval const core::bool::fromEnvironment(#C5) - #C7 = eval const [#C1] - #C8 = eval #C7 - #C9 = eval const [#C3] - #C10 = eval #C9 - #C11 = eval #C6 ?{core::List} #C8 : #C10 - #C12 = eval #C11 is core::List - #C13 = eval #C12 ?{core::List} #C2 : #C4 - #C14 = eval self::Foo{foo:#C13} -} - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245_variation_is.dart: -- Foo. (from org-dartlang-testcase:///issue_49245_variation_is.dart:7:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.modular.expect deleted file mode 100644 index 191035e0a533..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.modular.expect +++ /dev/null @@ -1,38 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::List foo; - const constructor •(core::List x) → self::Foo - : self::Foo::foo = x is core::List ?{core::List} #C2 : #C4, super core::Object::•() - ; -} -static method main() → dynamic { - const self::Foo foo = #C14; - core::print(#C14); - core::print(#C14); -} - -constants { - #C1 = 1 - #C2 = [#C1] - #C3 = 2 - #C4 = [#C3] - #C5 = "foo" - #C6 = eval const core::bool::fromEnvironment(#C5) - #C7 = eval const [#C1] - #C8 = eval #C7 - #C9 = eval const [#C3] - #C10 = eval #C9 - #C11 = eval #C6 ?{core::List} #C8 : #C10 - #C12 = eval #C11 is core::List - #C13 = eval #C12 ?{core::List} #C2 : #C4 - #C14 = eval self::Foo{foo:#C13} -} - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245_variation_is.dart: -- Foo. (from org-dartlang-testcase:///issue_49245_variation_is.dart:7:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.outline.expect deleted file mode 100644 index d5434573cd1b..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.outline.expect +++ /dev/null @@ -1,18 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::List foo; - const constructor •(core::List x) → self::Foo - : self::Foo::foo = x is core::List ?{core::List} const [1] : const [2], super core::Object::•() - ; -} -static method main() → dynamic - ; - - -Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue_49245_variation_is.dart:7:44 -> ListConstant(const [1]) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue_49245_variation_is.dart:7:56 -> ListConstant(const [2]) -Extra constant evaluation: evaluated: 5, effectively constant: 2 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.transformed.expect deleted file mode 100644 index 103e3684aac1..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.strong.transformed.expect +++ /dev/null @@ -1,44 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::List foo; - const constructor •(core::List x) → self::Foo - : self::Foo::foo = x is core::List ?{core::List} #C2 : #C4, super core::Object::•() - ; -} -static method main() → dynamic { - const self::Foo foo = #C14; - core::print(#C14); - core::print(#C14); -} - -constants { - #C1 = 1 - #C2 = [#C1] - #C3 = 2 - #C4 = [#C3] - #C5 = "foo" - #C6 = eval const core::bool::fromEnvironment(#C5) - #C7 = eval const [#C1] - #C8 = eval #C7 - #C9 = eval const [#C3] - #C10 = eval #C9 - #C11 = eval #C6 ?{core::List} #C8 : #C10 - #C12 = eval #C11 is core::List - #C13 = eval #C12 ?{core::List} #C2 : #C4 - #C14 = eval self::Foo{foo:#C13} -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_is.dart:11:30 -> InstanceConstant(const Foo{Foo.foo: const [2]}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_is.dart:12:9 -> InstanceConstant(const Foo{Foo.foo: const [2]}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_is.dart:13:9 -> InstanceConstant(const Foo{Foo.foo: const [2]}) -Extra constant evaluation: evaluated: 8, effectively constant: 3 - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245_variation_is.dart: -- Foo. (from org-dartlang-testcase:///issue_49245_variation_is.dart:7:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline.expect deleted file mode 100644 index 5b687d01a1e0..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline.expect +++ /dev/null @@ -1,6 +0,0 @@ -class Foo { - final List foo; - const Foo(List x) : foo = x is List ? const [1] : const [2]; -} - -main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline_modelled.expect deleted file mode 100644 index 40cbc000b6a5..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,6 +0,0 @@ -class Foo { - const Foo(List x) : foo = x is List ? const [1] : const [2]; - final List foo; -} - -main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart deleted file mode 100644 index 1a9d6895b34d..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -class Foo { - const Foo( - int Function(String)? a1, - int Function(String)? a2, - int Function(String)? a3, - int Function(String)? a4, - int Function(String)? a5, - int Function(String)? a6, - int Function(String)? a7, - int Function(String)? a8, - int Function(String)? a9, - int Function(String)? a10, - int Function(String)? a11, - int Function(String)? a12, - int Function(String)? a13, - int Function(String)? a14, - int Function(String)? a15, - int Function(String)? a16, - int Function(String)? a17, - int Function(String)? a18, - int Function(String)? a19, - int Function(String)? a20, - int Function(String)? a21, - int Function(String)? a22, - int Function(String)? a23, - int Function(String)? a24, - ) : _foo = a1 ?? - a2 ?? - a3 ?? - a4 ?? - a5 ?? - a6 ?? - a7 ?? - a8 ?? - a9 ?? - a10 ?? - a11 ?? - a12 ?? - a13 ?? - a14 ?? - a15 ?? - a16 ?? - a17 ?? - a18 ?? - a19 ?? - a20 ?? - a21 ?? - a22 ?? - a23 ?? - a24 ?? - bar; - final int Function(String) _foo; -} - -int bar(String o) => int.parse(o); - -void main() { - const Foo myValue = Foo( - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - bool.fromEnvironment("baz") ? int.parse : null, - ); - - print(myValue); - print(myValue); - print(myValue); - print(myValue); -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.expect deleted file mode 100644 index 355252b37b94..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.expect +++ /dev/null @@ -1,129 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field (core::String) → core::int _foo; - const constructor •((core::String) →? core::int a1, (core::String) →? core::int a2, (core::String) →? core::int a3, (core::String) →? core::int a4, (core::String) →? core::int a5, (core::String) →? core::int a6, (core::String) →? core::int a7, (core::String) →? core::int a8, (core::String) →? core::int a9, (core::String) →? core::int a10, (core::String) →? core::int a11, (core::String) →? core::int a12, (core::String) →? core::int a13, (core::String) →? core::int a14, (core::String) →? core::int a15, (core::String) →? core::int a16, (core::String) →? core::int a17, (core::String) →? core::int a18, (core::String) →? core::int a19, (core::String) →? core::int a20, (core::String) →? core::int a21, (core::String) →? core::int a22, (core::String) →? core::int a23, (core::String) →? core::int a24) → self::Foo - : self::Foo::_foo = let final (core::String) →? core::int #t1 = let final (core::String) →? core::int #t2 = let final (core::String) →? core::int #t3 = let final (core::String) →? core::int #t4 = let final (core::String) →? core::int #t5 = let final (core::String) →? core::int #t6 = let final (core::String) →? core::int #t7 = let final (core::String) →? core::int #t8 = let final (core::String) →? core::int #t9 = let final (core::String) →? core::int #t10 = let final (core::String) →? core::int #t11 = let final (core::String) →? core::int #t12 = let final (core::String) →? core::int #t13 = let final (core::String) →? core::int #t14 = let final (core::String) →? core::int #t15 = let final (core::String) →? core::int #t16 = let final (core::String) →? core::int #t17 = let final (core::String) →? core::int #t18 = let final (core::String) →? core::int #t19 = let final (core::String) →? core::int #t20 = let final (core::String) →? core::int #t21 = let final (core::String) →? core::int #t22 = let final (core::String) →? core::int #t23 = let final (core::String) →? core::int #t24 = a1 in #t24 == null ?{(core::String) →? core::int} a2 : #t24{(core::String) → core::int} in #t23 == null ?{(core::String) →? core::int} a3 : #t23{(core::String) → core::int} in #t22 == null ?{(core::String) →? core::int} a4 : #t22{(core::String) → core::int} in #t21 == null ?{(core::String) →? core::int} a5 : #t21{(core::String) → core::int} in #t20 == null ?{(core::String) →? core::int} a6 : #t20{(core::String) → core::int} in #t19 == null ?{(core::String) →? core::int} a7 : #t19{(core::String) → core::int} in #t18 == null ?{(core::String) →? core::int} a8 : #t18{(core::String) → core::int} in #t17 == null ?{(core::String) →? core::int} a9 : #t17{(core::String) → core::int} in #t16 == null ?{(core::String) →? core::int} a10 : #t16{(core::String) → core::int} in #t15 == null ?{(core::String) →? core::int} a11 : #t15{(core::String) → core::int} in #t14 == null ?{(core::String) →? core::int} a12 : #t14{(core::String) → core::int} in #t13 == null ?{(core::String) →? core::int} a13 : #t13{(core::String) → core::int} in #t12 == null ?{(core::String) →? core::int} a14 : #t12{(core::String) → core::int} in #t11 == null ?{(core::String) →? core::int} a15 : #t11{(core::String) → core::int} in #t10 == null ?{(core::String) →? core::int} a16 : #t10{(core::String) → core::int} in #t9 == null ?{(core::String) →? core::int} a17 : #t9{(core::String) → core::int} in #t8 == null ?{(core::String) →? core::int} a18 : #t8{(core::String) → core::int} in #t7 == null ?{(core::String) →? core::int} a19 : #t7{(core::String) → core::int} in #t6 == null ?{(core::String) →? core::int} a20 : #t6{(core::String) → core::int} in #t5 == null ?{(core::String) →? core::int} a21 : #t5{(core::String) → core::int} in #t4 == null ?{(core::String) →? core::int} a22 : #t4{(core::String) → core::int} in #t3 == null ?{(core::String) →? core::int} a23 : #t3{(core::String) → core::int} in #t2 == null ?{(core::String) →? core::int} a24 : #t2{(core::String) → core::int} in #t1 == null ?{(core::String) → core::int} #C1 : #t1{(core::String) → core::int}, super core::Object::•() - ; -} -static method bar(core::String o) → core::int - return core::int::parse(o); -static method main() → void { - const self::Foo myValue = #C101; - core::print(#C101); - core::print(#C101); - core::print(#C101); - core::print(#C101); -} - -constants { - #C1 = static-tearoff self::bar - #C2 = "baz" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = static-tearoff core::int::parse - #C5 = null - #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C7 = eval #C6 == null - #C8 = eval const core::bool::fromEnvironment(#C2) - #C9 = eval #C8 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C10 = eval #C7 ?{(core::String) →? core::int} #C9 : #C6 - #C11 = eval #C10 == null - #C12 = eval const core::bool::fromEnvironment(#C2) - #C13 = eval #C12 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C14 = eval #C11 ?{(core::String) →? core::int} #C13 : #C10 - #C15 = eval #C14 == null - #C16 = eval const core::bool::fromEnvironment(#C2) - #C17 = eval #C16 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C18 = eval #C15 ?{(core::String) →? core::int} #C17 : #C14 - #C19 = eval #C18 == null - #C20 = eval const core::bool::fromEnvironment(#C2) - #C21 = eval #C20 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C22 = eval #C19 ?{(core::String) →? core::int} #C21 : #C18 - #C23 = eval #C22 == null - #C24 = eval const core::bool::fromEnvironment(#C2) - #C25 = eval #C24 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C26 = eval #C23 ?{(core::String) →? core::int} #C25 : #C22 - #C27 = eval #C26 == null - #C28 = eval const core::bool::fromEnvironment(#C2) - #C29 = eval #C28 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C30 = eval #C27 ?{(core::String) →? core::int} #C29 : #C26 - #C31 = eval #C30 == null - #C32 = eval const core::bool::fromEnvironment(#C2) - #C33 = eval #C32 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C34 = eval #C31 ?{(core::String) →? core::int} #C33 : #C30 - #C35 = eval #C34 == null - #C36 = eval const core::bool::fromEnvironment(#C2) - #C37 = eval #C36 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C38 = eval #C35 ?{(core::String) →? core::int} #C37 : #C34 - #C39 = eval #C38 == null - #C40 = eval const core::bool::fromEnvironment(#C2) - #C41 = eval #C40 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C42 = eval #C39 ?{(core::String) →? core::int} #C41 : #C38 - #C43 = eval #C42 == null - #C44 = eval const core::bool::fromEnvironment(#C2) - #C45 = eval #C44 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C46 = eval #C43 ?{(core::String) →? core::int} #C45 : #C42 - #C47 = eval #C46 == null - #C48 = eval const core::bool::fromEnvironment(#C2) - #C49 = eval #C48 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C50 = eval #C47 ?{(core::String) →? core::int} #C49 : #C46 - #C51 = eval #C50 == null - #C52 = eval const core::bool::fromEnvironment(#C2) - #C53 = eval #C52 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C54 = eval #C51 ?{(core::String) →? core::int} #C53 : #C50 - #C55 = eval #C54 == null - #C56 = eval const core::bool::fromEnvironment(#C2) - #C57 = eval #C56 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C58 = eval #C55 ?{(core::String) →? core::int} #C57 : #C54 - #C59 = eval #C58 == null - #C60 = eval const core::bool::fromEnvironment(#C2) - #C61 = eval #C60 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C62 = eval #C59 ?{(core::String) →? core::int} #C61 : #C58 - #C63 = eval #C62 == null - #C64 = eval const core::bool::fromEnvironment(#C2) - #C65 = eval #C64 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C66 = eval #C63 ?{(core::String) →? core::int} #C65 : #C62 - #C67 = eval #C66 == null - #C68 = eval const core::bool::fromEnvironment(#C2) - #C69 = eval #C68 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C70 = eval #C67 ?{(core::String) →? core::int} #C69 : #C66 - #C71 = eval #C70 == null - #C72 = eval const core::bool::fromEnvironment(#C2) - #C73 = eval #C72 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C74 = eval #C71 ?{(core::String) →? core::int} #C73 : #C70 - #C75 = eval #C74 == null - #C76 = eval const core::bool::fromEnvironment(#C2) - #C77 = eval #C76 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C78 = eval #C75 ?{(core::String) →? core::int} #C77 : #C74 - #C79 = eval #C78 == null - #C80 = eval const core::bool::fromEnvironment(#C2) - #C81 = eval #C80 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C82 = eval #C79 ?{(core::String) →? core::int} #C81 : #C78 - #C83 = eval #C82 == null - #C84 = eval const core::bool::fromEnvironment(#C2) - #C85 = eval #C84 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C86 = eval #C83 ?{(core::String) →? core::int} #C85 : #C82 - #C87 = eval #C86 == null - #C88 = eval const core::bool::fromEnvironment(#C2) - #C89 = eval #C88 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C90 = eval #C87 ?{(core::String) →? core::int} #C89 : #C86 - #C91 = eval #C90 == null - #C92 = eval const core::bool::fromEnvironment(#C2) - #C93 = eval #C92 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C94 = eval #C91 ?{(core::String) →? core::int} #C93 : #C90 - #C95 = eval #C94 == null - #C96 = eval const core::bool::fromEnvironment(#C2) - #C97 = eval #C96 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C98 = eval #C95 ?{(core::String) →? core::int} #C97 : #C94 - #C99 = eval #C98 == null - #C100 = eval #C99 ?{(core::String) → core::int} #C1 : #C98 - #C101 = eval self::Foo{_foo:#C100} -} - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart: -- Foo. (from org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:6:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.modular.expect deleted file mode 100644 index 355252b37b94..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.modular.expect +++ /dev/null @@ -1,129 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field (core::String) → core::int _foo; - const constructor •((core::String) →? core::int a1, (core::String) →? core::int a2, (core::String) →? core::int a3, (core::String) →? core::int a4, (core::String) →? core::int a5, (core::String) →? core::int a6, (core::String) →? core::int a7, (core::String) →? core::int a8, (core::String) →? core::int a9, (core::String) →? core::int a10, (core::String) →? core::int a11, (core::String) →? core::int a12, (core::String) →? core::int a13, (core::String) →? core::int a14, (core::String) →? core::int a15, (core::String) →? core::int a16, (core::String) →? core::int a17, (core::String) →? core::int a18, (core::String) →? core::int a19, (core::String) →? core::int a20, (core::String) →? core::int a21, (core::String) →? core::int a22, (core::String) →? core::int a23, (core::String) →? core::int a24) → self::Foo - : self::Foo::_foo = let final (core::String) →? core::int #t1 = let final (core::String) →? core::int #t2 = let final (core::String) →? core::int #t3 = let final (core::String) →? core::int #t4 = let final (core::String) →? core::int #t5 = let final (core::String) →? core::int #t6 = let final (core::String) →? core::int #t7 = let final (core::String) →? core::int #t8 = let final (core::String) →? core::int #t9 = let final (core::String) →? core::int #t10 = let final (core::String) →? core::int #t11 = let final (core::String) →? core::int #t12 = let final (core::String) →? core::int #t13 = let final (core::String) →? core::int #t14 = let final (core::String) →? core::int #t15 = let final (core::String) →? core::int #t16 = let final (core::String) →? core::int #t17 = let final (core::String) →? core::int #t18 = let final (core::String) →? core::int #t19 = let final (core::String) →? core::int #t20 = let final (core::String) →? core::int #t21 = let final (core::String) →? core::int #t22 = let final (core::String) →? core::int #t23 = let final (core::String) →? core::int #t24 = a1 in #t24 == null ?{(core::String) →? core::int} a2 : #t24{(core::String) → core::int} in #t23 == null ?{(core::String) →? core::int} a3 : #t23{(core::String) → core::int} in #t22 == null ?{(core::String) →? core::int} a4 : #t22{(core::String) → core::int} in #t21 == null ?{(core::String) →? core::int} a5 : #t21{(core::String) → core::int} in #t20 == null ?{(core::String) →? core::int} a6 : #t20{(core::String) → core::int} in #t19 == null ?{(core::String) →? core::int} a7 : #t19{(core::String) → core::int} in #t18 == null ?{(core::String) →? core::int} a8 : #t18{(core::String) → core::int} in #t17 == null ?{(core::String) →? core::int} a9 : #t17{(core::String) → core::int} in #t16 == null ?{(core::String) →? core::int} a10 : #t16{(core::String) → core::int} in #t15 == null ?{(core::String) →? core::int} a11 : #t15{(core::String) → core::int} in #t14 == null ?{(core::String) →? core::int} a12 : #t14{(core::String) → core::int} in #t13 == null ?{(core::String) →? core::int} a13 : #t13{(core::String) → core::int} in #t12 == null ?{(core::String) →? core::int} a14 : #t12{(core::String) → core::int} in #t11 == null ?{(core::String) →? core::int} a15 : #t11{(core::String) → core::int} in #t10 == null ?{(core::String) →? core::int} a16 : #t10{(core::String) → core::int} in #t9 == null ?{(core::String) →? core::int} a17 : #t9{(core::String) → core::int} in #t8 == null ?{(core::String) →? core::int} a18 : #t8{(core::String) → core::int} in #t7 == null ?{(core::String) →? core::int} a19 : #t7{(core::String) → core::int} in #t6 == null ?{(core::String) →? core::int} a20 : #t6{(core::String) → core::int} in #t5 == null ?{(core::String) →? core::int} a21 : #t5{(core::String) → core::int} in #t4 == null ?{(core::String) →? core::int} a22 : #t4{(core::String) → core::int} in #t3 == null ?{(core::String) →? core::int} a23 : #t3{(core::String) → core::int} in #t2 == null ?{(core::String) →? core::int} a24 : #t2{(core::String) → core::int} in #t1 == null ?{(core::String) → core::int} #C1 : #t1{(core::String) → core::int}, super core::Object::•() - ; -} -static method bar(core::String o) → core::int - return core::int::parse(o); -static method main() → void { - const self::Foo myValue = #C101; - core::print(#C101); - core::print(#C101); - core::print(#C101); - core::print(#C101); -} - -constants { - #C1 = static-tearoff self::bar - #C2 = "baz" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = static-tearoff core::int::parse - #C5 = null - #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C7 = eval #C6 == null - #C8 = eval const core::bool::fromEnvironment(#C2) - #C9 = eval #C8 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C10 = eval #C7 ?{(core::String) →? core::int} #C9 : #C6 - #C11 = eval #C10 == null - #C12 = eval const core::bool::fromEnvironment(#C2) - #C13 = eval #C12 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C14 = eval #C11 ?{(core::String) →? core::int} #C13 : #C10 - #C15 = eval #C14 == null - #C16 = eval const core::bool::fromEnvironment(#C2) - #C17 = eval #C16 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C18 = eval #C15 ?{(core::String) →? core::int} #C17 : #C14 - #C19 = eval #C18 == null - #C20 = eval const core::bool::fromEnvironment(#C2) - #C21 = eval #C20 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C22 = eval #C19 ?{(core::String) →? core::int} #C21 : #C18 - #C23 = eval #C22 == null - #C24 = eval const core::bool::fromEnvironment(#C2) - #C25 = eval #C24 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C26 = eval #C23 ?{(core::String) →? core::int} #C25 : #C22 - #C27 = eval #C26 == null - #C28 = eval const core::bool::fromEnvironment(#C2) - #C29 = eval #C28 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C30 = eval #C27 ?{(core::String) →? core::int} #C29 : #C26 - #C31 = eval #C30 == null - #C32 = eval const core::bool::fromEnvironment(#C2) - #C33 = eval #C32 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C34 = eval #C31 ?{(core::String) →? core::int} #C33 : #C30 - #C35 = eval #C34 == null - #C36 = eval const core::bool::fromEnvironment(#C2) - #C37 = eval #C36 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C38 = eval #C35 ?{(core::String) →? core::int} #C37 : #C34 - #C39 = eval #C38 == null - #C40 = eval const core::bool::fromEnvironment(#C2) - #C41 = eval #C40 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C42 = eval #C39 ?{(core::String) →? core::int} #C41 : #C38 - #C43 = eval #C42 == null - #C44 = eval const core::bool::fromEnvironment(#C2) - #C45 = eval #C44 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C46 = eval #C43 ?{(core::String) →? core::int} #C45 : #C42 - #C47 = eval #C46 == null - #C48 = eval const core::bool::fromEnvironment(#C2) - #C49 = eval #C48 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C50 = eval #C47 ?{(core::String) →? core::int} #C49 : #C46 - #C51 = eval #C50 == null - #C52 = eval const core::bool::fromEnvironment(#C2) - #C53 = eval #C52 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C54 = eval #C51 ?{(core::String) →? core::int} #C53 : #C50 - #C55 = eval #C54 == null - #C56 = eval const core::bool::fromEnvironment(#C2) - #C57 = eval #C56 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C58 = eval #C55 ?{(core::String) →? core::int} #C57 : #C54 - #C59 = eval #C58 == null - #C60 = eval const core::bool::fromEnvironment(#C2) - #C61 = eval #C60 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C62 = eval #C59 ?{(core::String) →? core::int} #C61 : #C58 - #C63 = eval #C62 == null - #C64 = eval const core::bool::fromEnvironment(#C2) - #C65 = eval #C64 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C66 = eval #C63 ?{(core::String) →? core::int} #C65 : #C62 - #C67 = eval #C66 == null - #C68 = eval const core::bool::fromEnvironment(#C2) - #C69 = eval #C68 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C70 = eval #C67 ?{(core::String) →? core::int} #C69 : #C66 - #C71 = eval #C70 == null - #C72 = eval const core::bool::fromEnvironment(#C2) - #C73 = eval #C72 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C74 = eval #C71 ?{(core::String) →? core::int} #C73 : #C70 - #C75 = eval #C74 == null - #C76 = eval const core::bool::fromEnvironment(#C2) - #C77 = eval #C76 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C78 = eval #C75 ?{(core::String) →? core::int} #C77 : #C74 - #C79 = eval #C78 == null - #C80 = eval const core::bool::fromEnvironment(#C2) - #C81 = eval #C80 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C82 = eval #C79 ?{(core::String) →? core::int} #C81 : #C78 - #C83 = eval #C82 == null - #C84 = eval const core::bool::fromEnvironment(#C2) - #C85 = eval #C84 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C86 = eval #C83 ?{(core::String) →? core::int} #C85 : #C82 - #C87 = eval #C86 == null - #C88 = eval const core::bool::fromEnvironment(#C2) - #C89 = eval #C88 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C90 = eval #C87 ?{(core::String) →? core::int} #C89 : #C86 - #C91 = eval #C90 == null - #C92 = eval const core::bool::fromEnvironment(#C2) - #C93 = eval #C92 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C94 = eval #C91 ?{(core::String) →? core::int} #C93 : #C90 - #C95 = eval #C94 == null - #C96 = eval const core::bool::fromEnvironment(#C2) - #C97 = eval #C96 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C98 = eval #C95 ?{(core::String) →? core::int} #C97 : #C94 - #C99 = eval #C98 == null - #C100 = eval #C99 ?{(core::String) → core::int} #C1 : #C98 - #C101 = eval self::Foo{_foo:#C100} -} - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart: -- Foo. (from org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:6:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.outline.expect deleted file mode 100644 index a0b67ec870a4..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.outline.expect +++ /dev/null @@ -1,19 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field (core::String) → core::int _foo; - const constructor •((core::String) →? core::int a1, (core::String) →? core::int a2, (core::String) →? core::int a3, (core::String) →? core::int a4, (core::String) →? core::int a5, (core::String) →? core::int a6, (core::String) →? core::int a7, (core::String) →? core::int a8, (core::String) →? core::int a9, (core::String) →? core::int a10, (core::String) →? core::int a11, (core::String) →? core::int a12, (core::String) →? core::int a13, (core::String) →? core::int a14, (core::String) →? core::int a15, (core::String) →? core::int a16, (core::String) →? core::int a17, (core::String) →? core::int a18, (core::String) →? core::int a19, (core::String) →? core::int a20, (core::String) →? core::int a21, (core::String) →? core::int a22, (core::String) →? core::int a23, (core::String) →? core::int a24) → self::Foo - : self::Foo::_foo = let final (core::String) →? core::int #t1 = let final (core::String) →? core::int #t2 = let final (core::String) →? core::int #t3 = let final (core::String) →? core::int #t4 = let final (core::String) →? core::int #t5 = let final (core::String) →? core::int #t6 = let final (core::String) →? core::int #t7 = let final (core::String) →? core::int #t8 = let final (core::String) →? core::int #t9 = let final (core::String) →? core::int #t10 = let final (core::String) →? core::int #t11 = let final (core::String) →? core::int #t12 = let final (core::String) →? core::int #t13 = let final (core::String) →? core::int #t14 = let final (core::String) →? core::int #t15 = let final (core::String) →? core::int #t16 = let final (core::String) →? core::int #t17 = let final (core::String) →? core::int #t18 = let final (core::String) →? core::int #t19 = let final (core::String) →? core::int #t20 = let final (core::String) →? core::int #t21 = let final (core::String) →? core::int #t22 = let final (core::String) →? core::int #t23 = let final (core::String) →? core::int #t24 = a1 in #t24 == null ?{(core::String) →? core::int} a2 : #t24{(core::String) → core::int} in #t23 == null ?{(core::String) →? core::int} a3 : #t23{(core::String) → core::int} in #t22 == null ?{(core::String) →? core::int} a4 : #t22{(core::String) → core::int} in #t21 == null ?{(core::String) →? core::int} a5 : #t21{(core::String) → core::int} in #t20 == null ?{(core::String) →? core::int} a6 : #t20{(core::String) → core::int} in #t19 == null ?{(core::String) →? core::int} a7 : #t19{(core::String) → core::int} in #t18 == null ?{(core::String) →? core::int} a8 : #t18{(core::String) → core::int} in #t17 == null ?{(core::String) →? core::int} a9 : #t17{(core::String) → core::int} in #t16 == null ?{(core::String) →? core::int} a10 : #t16{(core::String) → core::int} in #t15 == null ?{(core::String) →? core::int} a11 : #t15{(core::String) → core::int} in #t14 == null ?{(core::String) →? core::int} a12 : #t14{(core::String) → core::int} in #t13 == null ?{(core::String) →? core::int} a13 : #t13{(core::String) → core::int} in #t12 == null ?{(core::String) →? core::int} a14 : #t12{(core::String) → core::int} in #t11 == null ?{(core::String) →? core::int} a15 : #t11{(core::String) → core::int} in #t10 == null ?{(core::String) →? core::int} a16 : #t10{(core::String) → core::int} in #t9 == null ?{(core::String) →? core::int} a17 : #t9{(core::String) → core::int} in #t8 == null ?{(core::String) →? core::int} a18 : #t8{(core::String) → core::int} in #t7 == null ?{(core::String) →? core::int} a19 : #t7{(core::String) → core::int} in #t6 == null ?{(core::String) →? core::int} a20 : #t6{(core::String) → core::int} in #t5 == null ?{(core::String) →? core::int} a21 : #t5{(core::String) → core::int} in #t4 == null ?{(core::String) →? core::int} a22 : #t4{(core::String) → core::int} in #t3 == null ?{(core::String) →? core::int} a23 : #t3{(core::String) → core::int} in #t2 == null ?{(core::String) →? core::int} a24 : #t2{(core::String) → core::int} in #t1 == null ?{(core::String) → core::int} self::bar : #t1{(core::String) → core::int}, super core::Object::•() - ; -} -static method bar(core::String o) → core::int - ; -static method main() → void - ; - - -Extra constant evaluation status: -Evaluated: StaticTearOff @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:55:13 -> StaticTearOffConstant(bar) -Extra constant evaluation: evaluated: 145, effectively constant: 1 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.transformed.expect deleted file mode 100644 index 31c70c13e2ea..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.strong.transformed.expect +++ /dev/null @@ -1,137 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -class Foo extends core::Object /*hasConstConstructor*/ { - final field (core::String) → core::int _foo; - const constructor •((core::String) →? core::int a1, (core::String) →? core::int a2, (core::String) →? core::int a3, (core::String) →? core::int a4, (core::String) →? core::int a5, (core::String) →? core::int a6, (core::String) →? core::int a7, (core::String) →? core::int a8, (core::String) →? core::int a9, (core::String) →? core::int a10, (core::String) →? core::int a11, (core::String) →? core::int a12, (core::String) →? core::int a13, (core::String) →? core::int a14, (core::String) →? core::int a15, (core::String) →? core::int a16, (core::String) →? core::int a17, (core::String) →? core::int a18, (core::String) →? core::int a19, (core::String) →? core::int a20, (core::String) →? core::int a21, (core::String) →? core::int a22, (core::String) →? core::int a23, (core::String) →? core::int a24) → self::Foo - : self::Foo::_foo = let final (core::String) →? core::int #t1 = let final (core::String) →? core::int #t2 = let final (core::String) →? core::int #t3 = let final (core::String) →? core::int #t4 = let final (core::String) →? core::int #t5 = let final (core::String) →? core::int #t6 = let final (core::String) →? core::int #t7 = let final (core::String) →? core::int #t8 = let final (core::String) →? core::int #t9 = let final (core::String) →? core::int #t10 = let final (core::String) →? core::int #t11 = let final (core::String) →? core::int #t12 = let final (core::String) →? core::int #t13 = let final (core::String) →? core::int #t14 = let final (core::String) →? core::int #t15 = let final (core::String) →? core::int #t16 = let final (core::String) →? core::int #t17 = let final (core::String) →? core::int #t18 = let final (core::String) →? core::int #t19 = let final (core::String) →? core::int #t20 = let final (core::String) →? core::int #t21 = let final (core::String) →? core::int #t22 = let final (core::String) →? core::int #t23 = let final (core::String) →? core::int #t24 = a1 in #t24 == null ?{(core::String) →? core::int} a2 : #t24{(core::String) → core::int} in #t23 == null ?{(core::String) →? core::int} a3 : #t23{(core::String) → core::int} in #t22 == null ?{(core::String) →? core::int} a4 : #t22{(core::String) → core::int} in #t21 == null ?{(core::String) →? core::int} a5 : #t21{(core::String) → core::int} in #t20 == null ?{(core::String) →? core::int} a6 : #t20{(core::String) → core::int} in #t19 == null ?{(core::String) →? core::int} a7 : #t19{(core::String) → core::int} in #t18 == null ?{(core::String) →? core::int} a8 : #t18{(core::String) → core::int} in #t17 == null ?{(core::String) →? core::int} a9 : #t17{(core::String) → core::int} in #t16 == null ?{(core::String) →? core::int} a10 : #t16{(core::String) → core::int} in #t15 == null ?{(core::String) →? core::int} a11 : #t15{(core::String) → core::int} in #t14 == null ?{(core::String) →? core::int} a12 : #t14{(core::String) → core::int} in #t13 == null ?{(core::String) →? core::int} a13 : #t13{(core::String) → core::int} in #t12 == null ?{(core::String) →? core::int} a14 : #t12{(core::String) → core::int} in #t11 == null ?{(core::String) →? core::int} a15 : #t11{(core::String) → core::int} in #t10 == null ?{(core::String) →? core::int} a16 : #t10{(core::String) → core::int} in #t9 == null ?{(core::String) →? core::int} a17 : #t9{(core::String) → core::int} in #t8 == null ?{(core::String) →? core::int} a18 : #t8{(core::String) → core::int} in #t7 == null ?{(core::String) →? core::int} a19 : #t7{(core::String) → core::int} in #t6 == null ?{(core::String) →? core::int} a20 : #t6{(core::String) → core::int} in #t5 == null ?{(core::String) →? core::int} a21 : #t5{(core::String) → core::int} in #t4 == null ?{(core::String) →? core::int} a22 : #t4{(core::String) → core::int} in #t3 == null ?{(core::String) →? core::int} a23 : #t3{(core::String) → core::int} in #t2 == null ?{(core::String) →? core::int} a24 : #t2{(core::String) → core::int} in #t1 == null ?{(core::String) → core::int} #C1 : #t1{(core::String) → core::int}, super core::Object::•() - ; -} -static method bar(core::String o) → core::int - return core::int::parse(o); -static method main() → void { - const self::Foo myValue = #C101; - core::print(#C101); - core::print(#C101); - core::print(#C101); - core::print(#C101); -} - -constants { - #C1 = static-tearoff self::bar - #C2 = "baz" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = static-tearoff core::int::parse - #C5 = null - #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C7 = eval #C6 == null - #C8 = eval const core::bool::fromEnvironment(#C2) - #C9 = eval #C8 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C10 = eval #C7 ?{(core::String) →? core::int} #C9 : #C6 - #C11 = eval #C10 == null - #C12 = eval const core::bool::fromEnvironment(#C2) - #C13 = eval #C12 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C14 = eval #C11 ?{(core::String) →? core::int} #C13 : #C10 - #C15 = eval #C14 == null - #C16 = eval const core::bool::fromEnvironment(#C2) - #C17 = eval #C16 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C18 = eval #C15 ?{(core::String) →? core::int} #C17 : #C14 - #C19 = eval #C18 == null - #C20 = eval const core::bool::fromEnvironment(#C2) - #C21 = eval #C20 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C22 = eval #C19 ?{(core::String) →? core::int} #C21 : #C18 - #C23 = eval #C22 == null - #C24 = eval const core::bool::fromEnvironment(#C2) - #C25 = eval #C24 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C26 = eval #C23 ?{(core::String) →? core::int} #C25 : #C22 - #C27 = eval #C26 == null - #C28 = eval const core::bool::fromEnvironment(#C2) - #C29 = eval #C28 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C30 = eval #C27 ?{(core::String) →? core::int} #C29 : #C26 - #C31 = eval #C30 == null - #C32 = eval const core::bool::fromEnvironment(#C2) - #C33 = eval #C32 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C34 = eval #C31 ?{(core::String) →? core::int} #C33 : #C30 - #C35 = eval #C34 == null - #C36 = eval const core::bool::fromEnvironment(#C2) - #C37 = eval #C36 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C38 = eval #C35 ?{(core::String) →? core::int} #C37 : #C34 - #C39 = eval #C38 == null - #C40 = eval const core::bool::fromEnvironment(#C2) - #C41 = eval #C40 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C42 = eval #C39 ?{(core::String) →? core::int} #C41 : #C38 - #C43 = eval #C42 == null - #C44 = eval const core::bool::fromEnvironment(#C2) - #C45 = eval #C44 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C46 = eval #C43 ?{(core::String) →? core::int} #C45 : #C42 - #C47 = eval #C46 == null - #C48 = eval const core::bool::fromEnvironment(#C2) - #C49 = eval #C48 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C50 = eval #C47 ?{(core::String) →? core::int} #C49 : #C46 - #C51 = eval #C50 == null - #C52 = eval const core::bool::fromEnvironment(#C2) - #C53 = eval #C52 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C54 = eval #C51 ?{(core::String) →? core::int} #C53 : #C50 - #C55 = eval #C54 == null - #C56 = eval const core::bool::fromEnvironment(#C2) - #C57 = eval #C56 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C58 = eval #C55 ?{(core::String) →? core::int} #C57 : #C54 - #C59 = eval #C58 == null - #C60 = eval const core::bool::fromEnvironment(#C2) - #C61 = eval #C60 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C62 = eval #C59 ?{(core::String) →? core::int} #C61 : #C58 - #C63 = eval #C62 == null - #C64 = eval const core::bool::fromEnvironment(#C2) - #C65 = eval #C64 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C66 = eval #C63 ?{(core::String) →? core::int} #C65 : #C62 - #C67 = eval #C66 == null - #C68 = eval const core::bool::fromEnvironment(#C2) - #C69 = eval #C68 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C70 = eval #C67 ?{(core::String) →? core::int} #C69 : #C66 - #C71 = eval #C70 == null - #C72 = eval const core::bool::fromEnvironment(#C2) - #C73 = eval #C72 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C74 = eval #C71 ?{(core::String) →? core::int} #C73 : #C70 - #C75 = eval #C74 == null - #C76 = eval const core::bool::fromEnvironment(#C2) - #C77 = eval #C76 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C78 = eval #C75 ?{(core::String) →? core::int} #C77 : #C74 - #C79 = eval #C78 == null - #C80 = eval const core::bool::fromEnvironment(#C2) - #C81 = eval #C80 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C82 = eval #C79 ?{(core::String) →? core::int} #C81 : #C78 - #C83 = eval #C82 == null - #C84 = eval const core::bool::fromEnvironment(#C2) - #C85 = eval #C84 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C86 = eval #C83 ?{(core::String) →? core::int} #C85 : #C82 - #C87 = eval #C86 == null - #C88 = eval const core::bool::fromEnvironment(#C2) - #C89 = eval #C88 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C90 = eval #C87 ?{(core::String) →? core::int} #C89 : #C86 - #C91 = eval #C90 == null - #C92 = eval const core::bool::fromEnvironment(#C2) - #C93 = eval #C92 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C94 = eval #C91 ?{(core::String) →? core::int} #C93 : #C90 - #C95 = eval #C94 == null - #C96 = eval const core::bool::fromEnvironment(#C2) - #C97 = eval #C96 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5 - #C98 = eval #C95 ?{(core::String) →? core::int} #C97 : #C94 - #C99 = eval #C98 == null - #C100 = eval #C99 ?{(core::String) → core::int} #C1 : #C98 - #C101 = eval self::Foo{_foo:#C100} -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:62:23 -> InstanceConstant(const Foo{Foo._foo: bar}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:89:9 -> InstanceConstant(const Foo{Foo._foo: bar}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:90:9 -> InstanceConstant(const Foo{Foo._foo: bar}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:91:9 -> InstanceConstant(const Foo{Foo._foo: bar}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:92:9 -> InstanceConstant(const Foo{Foo._foo: bar}) -Extra constant evaluation: evaluated: 155, effectively constant: 5 - - -Constructor coverage from constants: -org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart: -- Foo. (from org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:6:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline.expect deleted file mode 100644 index 5f34655ac3a9..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline.expect +++ /dev/null @@ -1,57 +0,0 @@ -class Foo { - const Foo( - int Function(String)? a1, - int Function(String)? a2, - int Function(String)? a3, - int Function(String)? a4, - int Function(String)? a5, - int Function(String)? a6, - int Function(String)? a7, - int Function(String)? a8, - int Function(String)? a9, - int Function(String)? a10, - int Function(String)? a11, - int Function(String)? a12, - int Function(String)? a13, - int Function(String)? a14, - int Function(String)? a15, - int Function(String)? a16, - int Function(String)? a17, - int Function(String)? a18, - int Function(String)? a19, - int Function(String)? a20, - int Function(String)? a21, - int Function(String)? a22, - int Function(String)? a23, - int Function(String)? a24, - ) : _foo = a1 ?? - a2 ?? - a3 ?? - a4 ?? - a5 ?? - a6 ?? - a7 ?? - a8 ?? - a9 ?? - a10 ?? - a11 ?? - a12 ?? - a13 ?? - a14 ?? - a15 ?? - a16 ?? - a17 ?? - a18 ?? - a19 ?? - a20 ?? - a21 ?? - a22 ?? - a23 ?? - a24 ?? - bar; - final int Function(String) _foo; -} - -int bar(String o) => int.parse(o); - -void main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline_modelled.expect deleted file mode 100644 index 5f34655ac3a9..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,57 +0,0 @@ -class Foo { - const Foo( - int Function(String)? a1, - int Function(String)? a2, - int Function(String)? a3, - int Function(String)? a4, - int Function(String)? a5, - int Function(String)? a6, - int Function(String)? a7, - int Function(String)? a8, - int Function(String)? a9, - int Function(String)? a10, - int Function(String)? a11, - int Function(String)? a12, - int Function(String)? a13, - int Function(String)? a14, - int Function(String)? a15, - int Function(String)? a16, - int Function(String)? a17, - int Function(String)? a18, - int Function(String)? a19, - int Function(String)? a20, - int Function(String)? a21, - int Function(String)? a22, - int Function(String)? a23, - int Function(String)? a24, - ) : _foo = a1 ?? - a2 ?? - a3 ?? - a4 ?? - a5 ?? - a6 ?? - a7 ?? - a8 ?? - a9 ?? - a10 ?? - a11 ?? - a12 ?? - a13 ?? - a14 ?? - a15 ?? - a16 ?? - a17 ?? - a18 ?? - a19 ?? - a20 ?? - a21 ?? - a22 ?? - a23 ?? - a24 ?? - bar; - final int Function(String) _foo; -} - -int bar(String o) => int.parse(o); - -void main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart deleted file mode 100644 index 60f912787284..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart +++ /dev/null @@ -1,60 +0,0 @@ -const original = [ - "lots", - "of", - "strings", - String.fromEnvironment("original"), - "that", - "are", - "already", - "constants", -]; -const copy1 = original; -const copy2 = copy1; -const copy3 = copy2; -const copy4 = copy3; -const copy5 = copy4; -const copy6 = copy5; -const copy7 = copy6; -const copy8 = copy7; -const copy9 = copy8; -const copy10 = copy9; -const copy11 = copy10; -const copy12 = copy11; -const copy13 = copy12; -const copy14 = copy13; -const copy15 = copy14; -const copy16 = copy15; -const copy17 = copy16; -const copy18 = copy17; -const copy19 = copy18; -const copy20 = copy19; -const copy21 = copy20; -const copy22 = copy21; -const copy23 = copy22; -const copy24 = copy23; -const copy25 = copy24; -const copy26 = copy25; -const copy27 = copy26; -const copy28 = copy27; -const copy29 = copy28; -const copy30 = copy29; -const copy31 = copy30; -const copy32 = copy31; -const copy33 = copy32; -const copy34 = copy33; -const copy35 = copy34; -const copy36 = copy35; -const copy37 = copy36; -const copy38 = copy37; -const copy39 = copy38; -const copy40 = copy39; -const copy41 = copy40; -const copy42 = copy41; -const copy43 = copy42; -const copy44 = copy43; -const copy45 = copy44; -const copy46 = copy45; -const copy47 = copy46; -const copy48 = copy47; -const copy49 = copy48; -const copy50 = copy49; diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.expect deleted file mode 100644 index a6f217739689..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.expect +++ /dev/null @@ -1,71 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List original = #C13; -static const field core::List copy1 = #C13; -static const field core::List copy2 = #C13; -static const field core::List copy3 = #C13; -static const field core::List copy4 = #C13; -static const field core::List copy5 = #C13; -static const field core::List copy6 = #C13; -static const field core::List copy7 = #C13; -static const field core::List copy8 = #C13; -static const field core::List copy9 = #C13; -static const field core::List copy10 = #C13; -static const field core::List copy11 = #C13; -static const field core::List copy12 = #C13; -static const field core::List copy13 = #C13; -static const field core::List copy14 = #C13; -static const field core::List copy15 = #C13; -static const field core::List copy16 = #C13; -static const field core::List copy17 = #C13; -static const field core::List copy18 = #C13; -static const field core::List copy19 = #C13; -static const field core::List copy20 = #C13; -static const field core::List copy21 = #C13; -static const field core::List copy22 = #C13; -static const field core::List copy23 = #C13; -static const field core::List copy24 = #C13; -static const field core::List copy25 = #C13; -static const field core::List copy26 = #C13; -static const field core::List copy27 = #C13; -static const field core::List copy28 = #C13; -static const field core::List copy29 = #C13; -static const field core::List copy30 = #C13; -static const field core::List copy31 = #C13; -static const field core::List copy32 = #C13; -static const field core::List copy33 = #C13; -static const field core::List copy34 = #C13; -static const field core::List copy35 = #C13; -static const field core::List copy36 = #C13; -static const field core::List copy37 = #C13; -static const field core::List copy38 = #C13; -static const field core::List copy39 = #C13; -static const field core::List copy40 = #C13; -static const field core::List copy41 = #C13; -static const field core::List copy42 = #C13; -static const field core::List copy43 = #C13; -static const field core::List copy44 = #C13; -static const field core::List copy45 = #C13; -static const field core::List copy46 = #C13; -static const field core::List copy47 = #C13; -static const field core::List copy48 = #C13; -static const field core::List copy49 = #C13; -static const field core::List copy50 = #C13; - -constants { - #C1 = "lots" - #C2 = "of" - #C3 = "strings" - #C4 = [#C1, #C2, #C3] - #C5 = "original" - #C6 = eval const core::String::fromEnvironment(#C5) - #C7 = eval const [#C6] - #C8 = "that" - #C9 = "are" - #C10 = "already" - #C11 = "constants" - #C12 = [#C8, #C9, #C10, #C11] - #C13 = eval #C4 + #C7 + #C12 -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.modular.expect deleted file mode 100644 index a6f217739689..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.modular.expect +++ /dev/null @@ -1,71 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List original = #C13; -static const field core::List copy1 = #C13; -static const field core::List copy2 = #C13; -static const field core::List copy3 = #C13; -static const field core::List copy4 = #C13; -static const field core::List copy5 = #C13; -static const field core::List copy6 = #C13; -static const field core::List copy7 = #C13; -static const field core::List copy8 = #C13; -static const field core::List copy9 = #C13; -static const field core::List copy10 = #C13; -static const field core::List copy11 = #C13; -static const field core::List copy12 = #C13; -static const field core::List copy13 = #C13; -static const field core::List copy14 = #C13; -static const field core::List copy15 = #C13; -static const field core::List copy16 = #C13; -static const field core::List copy17 = #C13; -static const field core::List copy18 = #C13; -static const field core::List copy19 = #C13; -static const field core::List copy20 = #C13; -static const field core::List copy21 = #C13; -static const field core::List copy22 = #C13; -static const field core::List copy23 = #C13; -static const field core::List copy24 = #C13; -static const field core::List copy25 = #C13; -static const field core::List copy26 = #C13; -static const field core::List copy27 = #C13; -static const field core::List copy28 = #C13; -static const field core::List copy29 = #C13; -static const field core::List copy30 = #C13; -static const field core::List copy31 = #C13; -static const field core::List copy32 = #C13; -static const field core::List copy33 = #C13; -static const field core::List copy34 = #C13; -static const field core::List copy35 = #C13; -static const field core::List copy36 = #C13; -static const field core::List copy37 = #C13; -static const field core::List copy38 = #C13; -static const field core::List copy39 = #C13; -static const field core::List copy40 = #C13; -static const field core::List copy41 = #C13; -static const field core::List copy42 = #C13; -static const field core::List copy43 = #C13; -static const field core::List copy44 = #C13; -static const field core::List copy45 = #C13; -static const field core::List copy46 = #C13; -static const field core::List copy47 = #C13; -static const field core::List copy48 = #C13; -static const field core::List copy49 = #C13; -static const field core::List copy50 = #C13; - -constants { - #C1 = "lots" - #C2 = "of" - #C3 = "strings" - #C4 = [#C1, #C2, #C3] - #C5 = "original" - #C6 = eval const core::String::fromEnvironment(#C5) - #C7 = eval const [#C6] - #C8 = "that" - #C9 = "are" - #C10 = "already" - #C11 = "constants" - #C12 = [#C8, #C9, #C10, #C11] - #C13 = eval #C4 + #C7 + #C12 -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.outline.expect deleted file mode 100644 index 650d9ca6873a..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.outline.expect +++ /dev/null @@ -1,111 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List original = const ["lots", "of", "strings", const core::String::fromEnvironment("original"), "that", "are", "already", "constants"]; -static const field core::List copy1 = self::original; -static const field core::List copy2 = self::copy1; -static const field core::List copy3 = self::copy2; -static const field core::List copy4 = self::copy3; -static const field core::List copy5 = self::copy4; -static const field core::List copy6 = self::copy5; -static const field core::List copy7 = self::copy6; -static const field core::List copy8 = self::copy7; -static const field core::List copy9 = self::copy8; -static const field core::List copy10 = self::copy9; -static const field core::List copy11 = self::copy10; -static const field core::List copy12 = self::copy11; -static const field core::List copy13 = self::copy12; -static const field core::List copy14 = self::copy13; -static const field core::List copy15 = self::copy14; -static const field core::List copy16 = self::copy15; -static const field core::List copy17 = self::copy16; -static const field core::List copy18 = self::copy17; -static const field core::List copy19 = self::copy18; -static const field core::List copy20 = self::copy19; -static const field core::List copy21 = self::copy20; -static const field core::List copy22 = self::copy21; -static const field core::List copy23 = self::copy22; -static const field core::List copy24 = self::copy23; -static const field core::List copy25 = self::copy24; -static const field core::List copy26 = self::copy25; -static const field core::List copy27 = self::copy26; -static const field core::List copy28 = self::copy27; -static const field core::List copy29 = self::copy28; -static const field core::List copy30 = self::copy29; -static const field core::List copy31 = self::copy30; -static const field core::List copy32 = self::copy31; -static const field core::List copy33 = self::copy32; -static const field core::List copy34 = self::copy33; -static const field core::List copy35 = self::copy34; -static const field core::List copy36 = self::copy35; -static const field core::List copy37 = self::copy36; -static const field core::List copy38 = self::copy37; -static const field core::List copy39 = self::copy38; -static const field core::List copy40 = self::copy39; -static const field core::List copy41 = self::copy40; -static const field core::List copy42 = self::copy41; -static const field core::List copy43 = self::copy42; -static const field core::List copy44 = self::copy43; -static const field core::List copy45 = self::copy44; -static const field core::List copy46 = self::copy45; -static const field core::List copy47 = self::copy46; -static const field core::List copy48 = self::copy47; -static const field core::List copy49 = self::copy48; -static const field core::List copy50 = self::copy49; - - -Extra constant evaluation status: -Evaluated with empty environment: ListLiteral @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:1:18 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:5:10 -> StringConstant("") -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:11:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:12:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:13:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:14:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:15:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:16:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:17:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:18:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:19:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:20:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:21:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:22:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:23:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:24:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:25:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:26:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:27:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:28:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:29:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:30:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:31:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:32:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:33:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:34:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:35:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:36:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:37:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:38:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:39:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:40:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:41:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:42:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:43:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:44:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:45:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:46:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:47:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:48:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:49:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:50:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:51:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:52:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:53:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:54:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:55:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:56:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:57:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:58:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:59:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:60:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Extra constant evaluation: evaluated: 52, effectively constant: 52 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.transformed.expect deleted file mode 100644 index 3328d1e43023..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.strong.transformed.expect +++ /dev/null @@ -1,125 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::List original = #C13; -static const field core::List copy1 = #C13; -static const field core::List copy2 = #C13; -static const field core::List copy3 = #C13; -static const field core::List copy4 = #C13; -static const field core::List copy5 = #C13; -static const field core::List copy6 = #C13; -static const field core::List copy7 = #C13; -static const field core::List copy8 = #C13; -static const field core::List copy9 = #C13; -static const field core::List copy10 = #C13; -static const field core::List copy11 = #C13; -static const field core::List copy12 = #C13; -static const field core::List copy13 = #C13; -static const field core::List copy14 = #C13; -static const field core::List copy15 = #C13; -static const field core::List copy16 = #C13; -static const field core::List copy17 = #C13; -static const field core::List copy18 = #C13; -static const field core::List copy19 = #C13; -static const field core::List copy20 = #C13; -static const field core::List copy21 = #C13; -static const field core::List copy22 = #C13; -static const field core::List copy23 = #C13; -static const field core::List copy24 = #C13; -static const field core::List copy25 = #C13; -static const field core::List copy26 = #C13; -static const field core::List copy27 = #C13; -static const field core::List copy28 = #C13; -static const field core::List copy29 = #C13; -static const field core::List copy30 = #C13; -static const field core::List copy31 = #C13; -static const field core::List copy32 = #C13; -static const field core::List copy33 = #C13; -static const field core::List copy34 = #C13; -static const field core::List copy35 = #C13; -static const field core::List copy36 = #C13; -static const field core::List copy37 = #C13; -static const field core::List copy38 = #C13; -static const field core::List copy39 = #C13; -static const field core::List copy40 = #C13; -static const field core::List copy41 = #C13; -static const field core::List copy42 = #C13; -static const field core::List copy43 = #C13; -static const field core::List copy44 = #C13; -static const field core::List copy45 = #C13; -static const field core::List copy46 = #C13; -static const field core::List copy47 = #C13; -static const field core::List copy48 = #C13; -static const field core::List copy49 = #C13; -static const field core::List copy50 = #C13; - -constants { - #C1 = "lots" - #C2 = "of" - #C3 = "strings" - #C4 = [#C1, #C2, #C3] - #C5 = "original" - #C6 = eval const core::String::fromEnvironment(#C5) - #C7 = eval const [#C6] - #C8 = "that" - #C9 = "are" - #C10 = "already" - #C11 = "constants" - #C12 = [#C8, #C9, #C10, #C11] - #C13 = eval #C4 + #C7 + #C12 -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:1:18 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:11:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:12:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:13:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:14:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:15:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:16:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:17:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:18:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:19:15 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:20:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:21:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:22:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:23:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:24:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:25:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:26:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:27:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:28:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:29:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:30:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:31:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:32:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:33:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:34:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:35:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:36:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:37:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:38:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:39:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:40:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:41:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:42:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:43:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:44:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:45:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:46:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:47:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:48:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:49:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:50:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:51:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:52:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:53:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:54:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:55:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:56:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:57:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:58:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:59:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///many_fields_pointing_to_previous_field.dart:60:16 -> ListConstant(const ["lots", "of", "strings", "", "that", "are", "already", "constants"]) -Extra constant evaluation: evaluated: 51, effectively constant: 51 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.textual_outline.expect deleted file mode 100644 index 162898c5573b..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.textual_outline.expect +++ /dev/null @@ -1,110 +0,0 @@ -const original = [ - "lots", - "of", - "strings", - String.fromEnvironment("original"), - "that", - "are", - "already", - "constants", -]; - -const copy1 = original; - -const copy2 = copy1; - -const copy3 = copy2; - -const copy4 = copy3; - -const copy5 = copy4; - -const copy6 = copy5; - -const copy7 = copy6; - -const copy8 = copy7; - -const copy9 = copy8; - -const copy10 = copy9; - -const copy11 = copy10; - -const copy12 = copy11; - -const copy13 = copy12; - -const copy14 = copy13; - -const copy15 = copy14; - -const copy16 = copy15; - -const copy17 = copy16; - -const copy18 = copy17; - -const copy19 = copy18; - -const copy20 = copy19; - -const copy21 = copy20; - -const copy22 = copy21; - -const copy23 = copy22; - -const copy24 = copy23; - -const copy25 = copy24; - -const copy26 = copy25; - -const copy27 = copy26; - -const copy28 = copy27; - -const copy29 = copy28; - -const copy30 = copy29; - -const copy31 = copy30; - -const copy32 = copy31; - -const copy33 = copy32; - -const copy34 = copy33; - -const copy35 = copy34; - -const copy36 = copy35; - -const copy37 = copy36; - -const copy38 = copy37; - -const copy39 = copy38; - -const copy40 = copy39; - -const copy41 = copy40; - -const copy42 = copy41; - -const copy43 = copy42; - -const copy44 = copy43; - -const copy45 = copy44; - -const copy46 = copy45; - -const copy47 = copy46; - -const copy48 = copy47; - -const copy49 = copy48; - -const copy50 = copy49; diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.textual_outline_modelled.expect deleted file mode 100644 index e31608580888..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,110 +0,0 @@ -const copy1 = original; - -const copy10 = copy9; - -const copy11 = copy10; - -const copy12 = copy11; - -const copy13 = copy12; - -const copy14 = copy13; - -const copy15 = copy14; - -const copy16 = copy15; - -const copy17 = copy16; - -const copy18 = copy17; - -const copy19 = copy18; - -const copy2 = copy1; - -const copy20 = copy19; - -const copy21 = copy20; - -const copy22 = copy21; - -const copy23 = copy22; - -const copy24 = copy23; - -const copy25 = copy24; - -const copy26 = copy25; - -const copy27 = copy26; - -const copy28 = copy27; - -const copy29 = copy28; - -const copy3 = copy2; - -const copy30 = copy29; - -const copy31 = copy30; - -const copy32 = copy31; - -const copy33 = copy32; - -const copy34 = copy33; - -const copy35 = copy34; - -const copy36 = copy35; - -const copy37 = copy36; - -const copy38 = copy37; - -const copy39 = copy38; - -const copy4 = copy3; - -const copy40 = copy39; - -const copy41 = copy40; - -const copy42 = copy41; - -const copy43 = copy42; - -const copy44 = copy43; - -const copy45 = copy44; - -const copy46 = copy45; - -const copy47 = copy46; - -const copy48 = copy47; - -const copy49 = copy48; - -const copy5 = copy4; - -const copy50 = copy49; - -const copy6 = copy5; - -const copy7 = copy6; - -const copy8 = copy7; - -const copy9 = copy8; - -const original = [ - "lots", - "of", - "strings", - String.fromEnvironment("original"), - "that", - "are", - "already", - "constants", -]; diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart deleted file mode 100644 index f790c4e5f72e..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const int foo = 42 * 42; -const String bar = - "hello" " " "${String.fromEnvironment("baz", defaultValue: "world")}" "!"; -const bool baz = true && true && (false || true) && (42 == 21 * 4 / 2); -const blaSymbol = #_x; - -main() { - _x(); - const bool.fromEnvironment("foo"); - print(bar); -} - -void _x() { - print(foo); - print(bar); -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.expect deleted file mode 100644 index 2b76ca7583a7..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.expect +++ /dev/null @@ -1,31 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::int foo = #C1; -static const field core::String bar = #C7; -static const field core::bool baz = #C8; -static const field core::Symbol blaSymbol = #C9; -static method main() → dynamic { - self::_x(); - #C11; - core::print(#C7); -} -static method _x() → void { - core::print(#C1); - core::print(#C7); -} - -constants { - #C1 = 1764 - #C2 = "hello " - #C3 = "baz" - #C4 = "world" - #C5 = eval const core::String::fromEnvironment(#C3, defaultValue: #C4) - #C6 = "!" - #C7 = eval "${#C2}${#C5}${#C6}" - #C8 = true - #C9 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x - #C10 = "foo" - #C11 = eval const core::bool::fromEnvironment(#C10) -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.modular.expect deleted file mode 100644 index 2b76ca7583a7..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.modular.expect +++ /dev/null @@ -1,31 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::int foo = #C1; -static const field core::String bar = #C7; -static const field core::bool baz = #C8; -static const field core::Symbol blaSymbol = #C9; -static method main() → dynamic { - self::_x(); - #C11; - core::print(#C7); -} -static method _x() → void { - core::print(#C1); - core::print(#C7); -} - -constants { - #C1 = 1764 - #C2 = "hello " - #C3 = "baz" - #C4 = "world" - #C5 = eval const core::String::fromEnvironment(#C3, defaultValue: #C4) - #C6 = "!" - #C7 = eval "${#C2}${#C5}${#C6}" - #C8 = true - #C9 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x - #C10 = "foo" - #C11 = eval const core::bool::fromEnvironment(#C10) -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.outline.expect deleted file mode 100644 index 3c851390f664..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.outline.expect +++ /dev/null @@ -1,21 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::int foo = 42.{core::num::*}(42){(core::num) → core::int}; -static const field core::String bar = "hello ${const core::String::fromEnvironment("baz", defaultValue: "world")}!"; -static const field core::bool baz = true && true && (false || true) && 42 =={core::num::==}{(core::Object) → core::bool} 21.{core::num::*}(4){(core::num) → core::int}.{core::num::/}(2){(core::num) → core::double}; -static const field core::Symbol blaSymbol = #_x; -static method main() → dynamic - ; -static method _x() → void - ; - - -Extra constant evaluation status: -Evaluated: InstanceInvocation @ org-dartlang-testcase:///rudimentary_test_01.dart:5:20 -> IntConstant(1764) -Evaluated with empty environment: StringConcatenation @ org-dartlang-testcase:///rudimentary_test_01.dart:6:18 -> StringConstant("hello world!") -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///rudimentary_test_01.dart:7:27 -> StringConstant("world") -Evaluated: LogicalExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:8:50 -> BoolConstant(true) -Evaluated: SymbolLiteral @ org-dartlang-testcase:///rudimentary_test_01.dart:9:19 -> SymbolConstant(#_x) -Extra constant evaluation: evaluated: 5, effectively constant: 5 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.transformed.expect deleted file mode 100644 index fcf0e5011833..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.strong.transformed.expect +++ /dev/null @@ -1,38 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -static const field core::int foo = #C1; -static const field core::String bar = #C7; -static const field core::bool baz = #C8; -static const field core::Symbol blaSymbol = #C9; -static method main() → dynamic { - self::_x(); - #C11; - core::print(#C7); -} -static method _x() → void { - core::print(#C1); - core::print(#C7); -} - -constants { - #C1 = 1764 - #C2 = "hello " - #C3 = "baz" - #C4 = "world" - #C5 = eval const core::String::fromEnvironment(#C3, defaultValue: #C4) - #C6 = "!" - #C7 = eval "${#C2}${#C5}${#C6}" - #C8 = true - #C9 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x - #C10 = "foo" - #C11 = eval const core::bool::fromEnvironment(#C10) -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:13:9 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:14:9 -> StringConstant("hello world!") -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:19:9 -> StringConstant("hello world!") -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:6:18 -> StringConstant("hello world!") -Extra constant evaluation: evaluated: 8, effectively constant: 4 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.textual_outline.expect deleted file mode 100644 index 4fd2a5c14732..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.textual_outline.expect +++ /dev/null @@ -1,12 +0,0 @@ -const int foo = 42 * 42; - -const String bar = - "hello" " " "${String.fromEnvironment("baz", defaultValue: "world")}" "!"; - -const bool baz = true && true && (false || true) && (42 == 21 * 4 / 2); - -const blaSymbol = #_x; - -main() {} - -void _x() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.textual_outline_modelled.expect deleted file mode 100644 index 0c52e84312d7..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,12 +0,0 @@ -const String bar = - "hello" " " "${String.fromEnvironment("baz", defaultValue: "world")}" "!"; - -const blaSymbol = #_x; - -const bool baz = true && true && (false || true) && (42 == 21 * 4 / 2); - -const int foo = 42 * 42; - -main() {} - -void _x() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart deleted file mode 100644 index 7e2d315c3c44..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "various_lib.dart" deferred as lib; - -const bool barFromEnv = const bool.fromEnvironment("bar"); -const bool hasBarEnv = const bool.hasEnvironment("bar"); -const bool? barFromEnvOrNull0 = const bool.fromEnvironment("bar") ? true : null; -const bool barFromEnvOrNull = - const bool.fromEnvironment("bar", defaultValue: barFromEnvOrNull0!); -const bool notBarFromEnvOrNull = !barFromEnvOrNull; -const bool conditionalOnNull = barFromEnvOrNull ? true : false; -const bool nullAwareOnNull = barFromEnvOrNull ?? true; -const bool andOnNull = barFromEnvOrNull && true; -const bool andOnNull2 = true && barFromEnvOrNull; -const bool orOnNull = barFromEnvOrNull || true; -const bool orOnNull2 = barFromEnvOrNull || false; -const bool orOnNull3 = true || barFromEnvOrNull; -const bool orOnNull4 = false || barFromEnvOrNull; - -const fromDeferredLib = lib.x; - -class Foo { - final bool saved; - final bool saved2; - const bool initialized = - const bool.fromEnvironment("foo", defaultValue: barFromEnv); - final E value; - - const Foo(this.value, - {this.saved2 = - const bool.fromEnvironment("foo", defaultValue: barFromEnv), - bool x = const bool.fromEnvironment("foo", defaultValue: barFromEnv)}) - : saved = x; -} - -const x = const Foo(42); - -const bool? y = true; -const bool z = !(y!); - -const maybeInt = bool.fromEnvironment("foo") ? 42 : true; -const bool isItInt = maybeInt is int ? true : false; -const maybeInt2 = z ? 42 : true; -const bool isItInt2 = maybeInt2 is int ? true : false; -const maybeInt3 = z ? 42 : null; -const bool isItInt3 = maybeInt3 is int ? true : false; - -const dynamic listOfNull = [null]; -const bool isListOfNull = listOfNull is List; -const dynamic listOfInt = [42]; -const bool isListOfInt = listOfInt is List; -const bool isList = listOfInt is List; -const dynamic setOfInt = {42}; -const bool isSetOfInt = setOfInt is Set; -const dynamic mapOfInt = {42: 42}; -const bool isMapOfInt = mapOfInt is Map; -const dynamic listOfListOfInt = [ - [42] -]; -const bool isListOfListOfInt = listOfListOfInt is List>; -const dynamic setOfSetOfInt = { - {42} -}; -const bool isSetOfSetOfInt = setOfSetOfInt is Set>; -const dynamic mapOfMapOfInt1 = { - {42: 42}: 42 -}; -const dynamic mapOfMapOfInt2 = { - 42: {42: 42} -}; -const bool isMapOfMapOfInt1 = mapOfMapOfInt1 is Map, int>; -const bool isMapOfMapOfInt2 = mapOfMapOfInt2 is Map>; - -const Symbol symbolWithUnevaluatedParameter = - const Symbol(String.fromEnvironment("foo")); -const Symbol symbolWithInvalidName = const Symbol("42"); - -class A { - const A(); - - A operator -() => this; -} - -class B implements A { - const B(); - - B operator -() => this; -} - -class C implements A { - const C(); - - C operator -() => this; -} - -class Class { - const Class(T t); - const Class.redirect(dynamic t) : this(t); - const Class.method(T t) : this(-t); -} - -class Subclass extends Class { - const Subclass(dynamic t) : super(t); -} - -const c0 = bool.fromEnvironment("x") ? null : const Class.redirect(C()); -const c1 = bool.fromEnvironment("x") ? null : const Class.method(A()); -const c2 = bool.fromEnvironment("x") ? null : const Subclass(C()); -const c3 = bool.fromEnvironment("x") ? null : const Class(A()); -const c4 = bool.fromEnvironment("x") ? null : const Class.redirect(B()); -const c5 = bool.fromEnvironment("x") ? null : const Subclass(A()); -const c6 = bool.fromEnvironment("x") ? null : const Subclass(B()); - -typedef F = int Function(int, {int named}); -const f = F; - -class ConstClassWithF { - final F foo; - const ConstClassWithF(this.foo); -} - -int procedure(int i, {int named}) => i; -ConstClassWithF constClassWithF1 = const ConstClassWithF(procedure); -const ConstClassWithF constClassWithF2 = const ConstClassWithF(procedure); - -const bool unevaluatedBool = bool.fromEnvironment("foo"); -const bool notUnevaluatedBool = !unevaluatedBool; -const bool? unevaluatedBoolOrNull = - bool.fromEnvironment("bar") ? unevaluatedBool : null; -const bool unevaluatedBoolNotNull = unevaluatedBoolOrNull!; - -main() { - print(c0); - print(c1); - print(c2); - print(c3); - print(c4); - print(c5); - print(c6); - print(x); - print(x.saved); - print(x.value); -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect deleted file mode 100644 index be4dd207b1dd..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect +++ /dev/null @@ -1,281 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:27:3: Error: Only static fields can be declared as const. -// Try using 'final' instead of 'const', or adding the keyword 'static'. -// const bool initialized = -// ^^^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:25: Error: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. -// Try moving the constant from the deferred library, or removing 'deferred' from the import. -// -// const fromDeferredLib = lib.x; -// ^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. -// - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. -// const Class.method(T t) : this(-t); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:124:27: Error: The parameter 'named' can't have a value of 'null' because of its type 'int', but the implicit default value is 'null'. -// Try adding either an explicit non-'null' default value or the 'required' modifier. -// int procedure(int i, {int named}) => i; -// ^^^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:31:9: Error: Constructor is marked 'const' so all fields must be final. -// const Foo(this.value, -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:27:14: Context: Field isn't final, but constructor is 'const'. -// const bool initialized = -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Error: Constant evaluation error: -// const fromDeferredLib = lib.x; -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Context: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. -// Try moving the constant from the deferred library, or removing 'deferred' from the import. -// -// const fromDeferredLib = lib.x; -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:7: Context: While analyzing: -// const fromDeferredLib = lib.x; -// ^ -// -import self as self; -import "dart:core" as core; -import "dart:_internal" as _in; - -import "org-dartlang-testcase:///various_lib.dart" deferred as lib; - -typedef F = (core::int, {named: core::int}) → core::int; -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::bool saved; - final field core::bool saved2; - field core::bool initialized = #C4; - final field self::Foo::E% value; - const constructor •(self::Foo::E% value, {core::bool saved2 = #C5, core::bool x = #C6}) → self::Foo - : self::Foo::value = value, self::Foo::saved2 = saved2, self::Foo::saved = x, super core::Object::•() - ; -} -class A extends core::Object /*hasConstConstructor*/ { - const constructor •() → self::A - : super core::Object::•() - ; - operator unary-() → self::A - return this; -} -class B extends core::Object implements self::A /*hasConstConstructor*/ { - const constructor •() → self::B - : super core::Object::•() - ; - operator unary-() → self::B - return this; -} -class C extends core::Object implements self::A /*hasConstConstructor*/ { - const constructor •() → self::C - : super core::Object::•() - ; - operator unary-() → self::C - return this; -} -class Class extends core::Object /*hasConstConstructor*/ { - const constructor •(self::Class::T t) → self::Class - : super core::Object::•() - ; - const constructor redirect(dynamic t) → self::Class - : this self::Class::•(t as{TypeError,ForDynamic} self::Class::T) - ; - const constructor method(self::Class::T t) → self::Class - : this self::Class::•(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^" in t.{self::A::unary-}(){() → self::A} as{TypeError} Never) - ; -} -class Subclass extends self::Class /*hasConstConstructor*/ { - const constructor •(dynamic t) → self::Subclass - : super self::Class::•(t as{TypeError,ForDynamic} self::Subclass::T) - ; -} -class ConstClassWithF extends core::Object /*hasConstConstructor*/ { - final field (core::int, {named: core::int}) → core::int foo; - const constructor •((core::int, {named: core::int}) → core::int foo) → self::ConstClassWithF - : self::ConstClassWithF::foo = foo, super core::Object::•() - ; -} -static const field core::bool barFromEnv = #C3; -static const field core::bool hasBarEnv = #C7; -static const field core::bool? barFromEnvOrNull0 = #C11; -static const field core::bool barFromEnvOrNull = #C13; -static const field core::bool notBarFromEnvOrNull = #C14; -static const field core::bool conditionalOnNull = #C16; -static const field core::bool nullAwareOnNull = #C18; -static const field core::bool andOnNull = #C19; -static const field core::bool andOnNull2 = #C13; -static const field core::bool orOnNull = #C20; -static const field core::bool orOnNull2 = #C21; -static const field core::bool orOnNull3 = #C9; -static const field core::bool orOnNull4 = #C13; -static const field core::int fromDeferredLib = invalid-expression "'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded."; -static const field self::Foo x = #C23; -static const field core::bool? y = #C9; -static const field core::bool z = #C15; -static const field core::Object maybeInt = #C25; -static const field core::bool isItInt = #C27; -static const field core::Object maybeInt2 = #C9; -static const field core::bool isItInt2 = #C15; -static const field core::int? maybeInt3 = #C10; -static const field core::bool isItInt3 = #C15; -static const field dynamic listOfNull = #C28; -static const field core::bool isListOfNull = #C9; -static const field dynamic listOfInt = #C29; -static const field core::bool isListOfInt = #C9; -static const field core::bool isList = #C9; -static const field dynamic setOfInt = #C30; -static const field core::bool isSetOfInt = #C9; -static const field dynamic mapOfInt = #C31; -static const field core::bool isMapOfInt = #C9; -static const field dynamic listOfListOfInt = #C32; -static const field core::bool isListOfListOfInt = #C9; -static const field dynamic setOfSetOfInt = #C33; -static const field core::bool isSetOfSetOfInt = #C9; -static const field dynamic mapOfMapOfInt1 = #C34; -static const field dynamic mapOfMapOfInt2 = #C35; -static const field core::bool isMapOfMapOfInt1 = #C9; -static const field core::bool isMapOfMapOfInt2 = #C9; -static const field core::Symbol symbolWithUnevaluatedParameter = #C37; -static const field core::Symbol symbolWithInvalidName = #C38; -static const field self::Class? c0 = #C44; -static const field self::Class? c1 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^"; -static const field self::Subclass? c2 = #C49; -static const field self::Class? c3 = #C53; -static const field self::Class? c4 = #C58; -static const field self::Subclass? c5 = #C63; -static const field self::Subclass? c6 = #C68; -static const field core::Type f = #C69; -static field self::ConstClassWithF constClassWithF1 = #C71; -static const field self::ConstClassWithF constClassWithF2 = #C71; -static const field core::bool unevaluatedBool = #C72; -static const field core::bool notUnevaluatedBool = #C73; -static const field core::bool? unevaluatedBoolOrNull = #C75; -static const field core::bool unevaluatedBoolNotNull = #C76; -static method procedure(core::int i, {core::int named = #C10}) → core::int - return i; -static method main() → dynamic { - core::print(#C44); - core::print(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^"); - core::print(#C49); - core::print(#C53); - core::print(#C58); - core::print(#C63); - core::print(#C68); - core::print(#C23); - core::print(#C23.{self::Foo::saved}{core::bool}); - core::print(#C23.{self::Foo::value}{core::int}); -} - -library; -import self as self2; -import "dart:core" as core; - -static const field core::int x = #C22; - -constants { - #C1 = "foo" - #C2 = "bar" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C6 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C7 = eval const core::bool::hasEnvironment(#C2) - #C8 = eval const core::bool::fromEnvironment(#C2) - #C9 = true - #C10 = null - #C11 = eval #C8 ?{core::bool?} #C9 : #C10 - #C12 = eval #C11! - #C13 = eval const core::bool::fromEnvironment(#C2, defaultValue: #C12) - #C14 = eval !#C13 - #C15 = false - #C16 = eval #C13 ?{core::bool} #C9 : #C15 - #C17 = eval #C13 == null - #C18 = eval #C17 ?{core::bool} #C9 : #C13 - #C19 = eval #C13 && #C9 - #C20 = eval #C13 || #C9 - #C21 = eval #C13 || #C15 - #C22 = 42 - #C23 = eval self::Foo{saved:#C6, saved2:#C5, initialized:#C4, value:#C22} - #C24 = eval const core::bool::fromEnvironment(#C1) - #C25 = eval #C24 ?{core::Object} #C22 : #C9 - #C26 = eval #C25 is core::int - #C27 = eval #C26 ?{core::bool} #C9 : #C15 - #C28 = [#C10] - #C29 = [#C22] - #C30 = {#C22} - #C31 = {#C22:#C22} - #C32 = >[#C29] - #C33 = >{#C30} - #C34 = , core::int>{#C31:#C22} - #C35 = >{#C22:#C31} - #C36 = eval const core::String::fromEnvironment(#C1) - #C37 = eval const _in::Symbol::•(#C36) - #C38 = #42 - #C39 = "x" - #C40 = eval const core::bool::fromEnvironment(#C39) - #C41 = eval self::C{} - #C42 = eval #C41 as self::B - #C43 = eval self::Class{#C42} - #C44 = eval #C40 ?{self::Class?} #C10 : #C43 - #C45 = eval const core::bool::fromEnvironment(#C39) - #C46 = eval self::C{} - #C47 = eval #C46 as self::B - #C48 = eval self::Subclass{#C47} - #C49 = eval #C45 ?{self::Subclass?} #C10 : #C48 - #C50 = eval const core::bool::fromEnvironment(#C39) - #C51 = eval self::A{} - #C52 = eval self::Class{#C51} - #C53 = eval #C50 ?{self::Class?} #C10 : #C52 - #C54 = eval const core::bool::fromEnvironment(#C39) - #C55 = eval self::B{} - #C56 = eval #C55 as self::B - #C57 = eval self::Class{#C56} - #C58 = eval #C54 ?{self::Class?} #C10 : #C57 - #C59 = eval const core::bool::fromEnvironment(#C39) - #C60 = eval self::A{} - #C61 = eval #C60 as self::A - #C62 = eval self::Subclass{#C61} - #C63 = eval #C59 ?{self::Subclass?} #C10 : #C62 - #C64 = eval const core::bool::fromEnvironment(#C39) - #C65 = eval self::B{} - #C66 = eval #C65 as self::B - #C67 = eval self::Subclass{#C66} - #C68 = eval #C64 ?{self::Subclass?} #C10 : #C67 - #C69 = TypeLiteralConstant((core::int, {named: core::int}) → core::int) - #C70 = static-tearoff self::procedure - #C71 = self::ConstClassWithF {foo:#C70} - #C72 = eval const core::bool::fromEnvironment(#C1) - #C73 = eval !#C72 - #C74 = eval const core::bool::fromEnvironment(#C2) - #C75 = eval #C74 ?{core::bool?} #C72 : #C10 - #C76 = eval #C75! -} - - -Constructor coverage from constants: -org-dartlang-testcase:///various.dart: -- C. (from org-dartlang-testcase:///various.dart:93:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) -- Class.redirect (from org-dartlang-testcase:///various.dart:100:9) -- Class. (from org-dartlang-testcase:///various.dart:99:9) -- A. (from org-dartlang-testcase:///various.dart:81:9) -- Class.method (from org-dartlang-testcase:///various.dart:101:9) -- Subclass. (from org-dartlang-testcase:///various.dart:105:9) -- B. (from org-dartlang-testcase:///various.dart:87:9) -- Foo. (from org-dartlang-testcase:///various.dart:31:9) -- ConstClassWithF. (from org-dartlang-testcase:///various.dart:121:9) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.modular.expect deleted file mode 100644 index be4dd207b1dd..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.modular.expect +++ /dev/null @@ -1,281 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:27:3: Error: Only static fields can be declared as const. -// Try using 'final' instead of 'const', or adding the keyword 'static'. -// const bool initialized = -// ^^^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:25: Error: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. -// Try moving the constant from the deferred library, or removing 'deferred' from the import. -// -// const fromDeferredLib = lib.x; -// ^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. -// - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. -// const Class.method(T t) : this(-t); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:124:27: Error: The parameter 'named' can't have a value of 'null' because of its type 'int', but the implicit default value is 'null'. -// Try adding either an explicit non-'null' default value or the 'required' modifier. -// int procedure(int i, {int named}) => i; -// ^^^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:31:9: Error: Constructor is marked 'const' so all fields must be final. -// const Foo(this.value, -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:27:14: Context: Field isn't final, but constructor is 'const'. -// const bool initialized = -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Error: Constant evaluation error: -// const fromDeferredLib = lib.x; -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Context: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. -// Try moving the constant from the deferred library, or removing 'deferred' from the import. -// -// const fromDeferredLib = lib.x; -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:7: Context: While analyzing: -// const fromDeferredLib = lib.x; -// ^ -// -import self as self; -import "dart:core" as core; -import "dart:_internal" as _in; - -import "org-dartlang-testcase:///various_lib.dart" deferred as lib; - -typedef F = (core::int, {named: core::int}) → core::int; -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::bool saved; - final field core::bool saved2; - field core::bool initialized = #C4; - final field self::Foo::E% value; - const constructor •(self::Foo::E% value, {core::bool saved2 = #C5, core::bool x = #C6}) → self::Foo - : self::Foo::value = value, self::Foo::saved2 = saved2, self::Foo::saved = x, super core::Object::•() - ; -} -class A extends core::Object /*hasConstConstructor*/ { - const constructor •() → self::A - : super core::Object::•() - ; - operator unary-() → self::A - return this; -} -class B extends core::Object implements self::A /*hasConstConstructor*/ { - const constructor •() → self::B - : super core::Object::•() - ; - operator unary-() → self::B - return this; -} -class C extends core::Object implements self::A /*hasConstConstructor*/ { - const constructor •() → self::C - : super core::Object::•() - ; - operator unary-() → self::C - return this; -} -class Class extends core::Object /*hasConstConstructor*/ { - const constructor •(self::Class::T t) → self::Class - : super core::Object::•() - ; - const constructor redirect(dynamic t) → self::Class - : this self::Class::•(t as{TypeError,ForDynamic} self::Class::T) - ; - const constructor method(self::Class::T t) → self::Class - : this self::Class::•(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^" in t.{self::A::unary-}(){() → self::A} as{TypeError} Never) - ; -} -class Subclass extends self::Class /*hasConstConstructor*/ { - const constructor •(dynamic t) → self::Subclass - : super self::Class::•(t as{TypeError,ForDynamic} self::Subclass::T) - ; -} -class ConstClassWithF extends core::Object /*hasConstConstructor*/ { - final field (core::int, {named: core::int}) → core::int foo; - const constructor •((core::int, {named: core::int}) → core::int foo) → self::ConstClassWithF - : self::ConstClassWithF::foo = foo, super core::Object::•() - ; -} -static const field core::bool barFromEnv = #C3; -static const field core::bool hasBarEnv = #C7; -static const field core::bool? barFromEnvOrNull0 = #C11; -static const field core::bool barFromEnvOrNull = #C13; -static const field core::bool notBarFromEnvOrNull = #C14; -static const field core::bool conditionalOnNull = #C16; -static const field core::bool nullAwareOnNull = #C18; -static const field core::bool andOnNull = #C19; -static const field core::bool andOnNull2 = #C13; -static const field core::bool orOnNull = #C20; -static const field core::bool orOnNull2 = #C21; -static const field core::bool orOnNull3 = #C9; -static const field core::bool orOnNull4 = #C13; -static const field core::int fromDeferredLib = invalid-expression "'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded."; -static const field self::Foo x = #C23; -static const field core::bool? y = #C9; -static const field core::bool z = #C15; -static const field core::Object maybeInt = #C25; -static const field core::bool isItInt = #C27; -static const field core::Object maybeInt2 = #C9; -static const field core::bool isItInt2 = #C15; -static const field core::int? maybeInt3 = #C10; -static const field core::bool isItInt3 = #C15; -static const field dynamic listOfNull = #C28; -static const field core::bool isListOfNull = #C9; -static const field dynamic listOfInt = #C29; -static const field core::bool isListOfInt = #C9; -static const field core::bool isList = #C9; -static const field dynamic setOfInt = #C30; -static const field core::bool isSetOfInt = #C9; -static const field dynamic mapOfInt = #C31; -static const field core::bool isMapOfInt = #C9; -static const field dynamic listOfListOfInt = #C32; -static const field core::bool isListOfListOfInt = #C9; -static const field dynamic setOfSetOfInt = #C33; -static const field core::bool isSetOfSetOfInt = #C9; -static const field dynamic mapOfMapOfInt1 = #C34; -static const field dynamic mapOfMapOfInt2 = #C35; -static const field core::bool isMapOfMapOfInt1 = #C9; -static const field core::bool isMapOfMapOfInt2 = #C9; -static const field core::Symbol symbolWithUnevaluatedParameter = #C37; -static const field core::Symbol symbolWithInvalidName = #C38; -static const field self::Class? c0 = #C44; -static const field self::Class? c1 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^"; -static const field self::Subclass? c2 = #C49; -static const field self::Class? c3 = #C53; -static const field self::Class? c4 = #C58; -static const field self::Subclass? c5 = #C63; -static const field self::Subclass? c6 = #C68; -static const field core::Type f = #C69; -static field self::ConstClassWithF constClassWithF1 = #C71; -static const field self::ConstClassWithF constClassWithF2 = #C71; -static const field core::bool unevaluatedBool = #C72; -static const field core::bool notUnevaluatedBool = #C73; -static const field core::bool? unevaluatedBoolOrNull = #C75; -static const field core::bool unevaluatedBoolNotNull = #C76; -static method procedure(core::int i, {core::int named = #C10}) → core::int - return i; -static method main() → dynamic { - core::print(#C44); - core::print(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^"); - core::print(#C49); - core::print(#C53); - core::print(#C58); - core::print(#C63); - core::print(#C68); - core::print(#C23); - core::print(#C23.{self::Foo::saved}{core::bool}); - core::print(#C23.{self::Foo::value}{core::int}); -} - -library; -import self as self2; -import "dart:core" as core; - -static const field core::int x = #C22; - -constants { - #C1 = "foo" - #C2 = "bar" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C6 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C7 = eval const core::bool::hasEnvironment(#C2) - #C8 = eval const core::bool::fromEnvironment(#C2) - #C9 = true - #C10 = null - #C11 = eval #C8 ?{core::bool?} #C9 : #C10 - #C12 = eval #C11! - #C13 = eval const core::bool::fromEnvironment(#C2, defaultValue: #C12) - #C14 = eval !#C13 - #C15 = false - #C16 = eval #C13 ?{core::bool} #C9 : #C15 - #C17 = eval #C13 == null - #C18 = eval #C17 ?{core::bool} #C9 : #C13 - #C19 = eval #C13 && #C9 - #C20 = eval #C13 || #C9 - #C21 = eval #C13 || #C15 - #C22 = 42 - #C23 = eval self::Foo{saved:#C6, saved2:#C5, initialized:#C4, value:#C22} - #C24 = eval const core::bool::fromEnvironment(#C1) - #C25 = eval #C24 ?{core::Object} #C22 : #C9 - #C26 = eval #C25 is core::int - #C27 = eval #C26 ?{core::bool} #C9 : #C15 - #C28 = [#C10] - #C29 = [#C22] - #C30 = {#C22} - #C31 = {#C22:#C22} - #C32 = >[#C29] - #C33 = >{#C30} - #C34 = , core::int>{#C31:#C22} - #C35 = >{#C22:#C31} - #C36 = eval const core::String::fromEnvironment(#C1) - #C37 = eval const _in::Symbol::•(#C36) - #C38 = #42 - #C39 = "x" - #C40 = eval const core::bool::fromEnvironment(#C39) - #C41 = eval self::C{} - #C42 = eval #C41 as self::B - #C43 = eval self::Class{#C42} - #C44 = eval #C40 ?{self::Class?} #C10 : #C43 - #C45 = eval const core::bool::fromEnvironment(#C39) - #C46 = eval self::C{} - #C47 = eval #C46 as self::B - #C48 = eval self::Subclass{#C47} - #C49 = eval #C45 ?{self::Subclass?} #C10 : #C48 - #C50 = eval const core::bool::fromEnvironment(#C39) - #C51 = eval self::A{} - #C52 = eval self::Class{#C51} - #C53 = eval #C50 ?{self::Class?} #C10 : #C52 - #C54 = eval const core::bool::fromEnvironment(#C39) - #C55 = eval self::B{} - #C56 = eval #C55 as self::B - #C57 = eval self::Class{#C56} - #C58 = eval #C54 ?{self::Class?} #C10 : #C57 - #C59 = eval const core::bool::fromEnvironment(#C39) - #C60 = eval self::A{} - #C61 = eval #C60 as self::A - #C62 = eval self::Subclass{#C61} - #C63 = eval #C59 ?{self::Subclass?} #C10 : #C62 - #C64 = eval const core::bool::fromEnvironment(#C39) - #C65 = eval self::B{} - #C66 = eval #C65 as self::B - #C67 = eval self::Subclass{#C66} - #C68 = eval #C64 ?{self::Subclass?} #C10 : #C67 - #C69 = TypeLiteralConstant((core::int, {named: core::int}) → core::int) - #C70 = static-tearoff self::procedure - #C71 = self::ConstClassWithF {foo:#C70} - #C72 = eval const core::bool::fromEnvironment(#C1) - #C73 = eval !#C72 - #C74 = eval const core::bool::fromEnvironment(#C2) - #C75 = eval #C74 ?{core::bool?} #C72 : #C10 - #C76 = eval #C75! -} - - -Constructor coverage from constants: -org-dartlang-testcase:///various.dart: -- C. (from org-dartlang-testcase:///various.dart:93:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) -- Class.redirect (from org-dartlang-testcase:///various.dart:100:9) -- Class. (from org-dartlang-testcase:///various.dart:99:9) -- A. (from org-dartlang-testcase:///various.dart:81:9) -- Class.method (from org-dartlang-testcase:///various.dart:101:9) -- Subclass. (from org-dartlang-testcase:///various.dart:105:9) -- B. (from org-dartlang-testcase:///various.dart:87:9) -- Foo. (from org-dartlang-testcase:///various.dart:31:9) -- ConstClassWithF. (from org-dartlang-testcase:///various.dart:121:9) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.outline.expect deleted file mode 100644 index 1b656d30653c..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.outline.expect +++ /dev/null @@ -1,227 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:27:3: Error: Only static fields can be declared as const. -// Try using 'final' instead of 'const', or adding the keyword 'static'. -// const bool initialized = -// ^^^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:25: Error: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. -// Try moving the constant from the deferred library, or removing 'deferred' from the import. -// -// const fromDeferredLib = lib.x; -// ^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. -// - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. -// const Class.method(T t) : this(-t); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:124:27: Error: The parameter 'named' can't have a value of 'null' because of its type 'int', but the implicit default value is 'null'. -// Try adding either an explicit non-'null' default value or the 'required' modifier. -// int procedure(int i, {int named}) => i; -// ^^^^^ -// -import self as self; -import "dart:core" as core; -import "various_lib.dart" as var; -import "dart:_internal" as _in; - -import "org-dartlang-testcase:///various_lib.dart" deferred as lib; - -typedef F = (core::int, {named: core::int}) → core::int; -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::bool saved; - final field core::bool saved2; - field core::bool initialized; - final field self::Foo::E% value; - const constructor •(self::Foo::E% value, {core::bool saved2 = const core::bool::fromEnvironment("foo", defaultValue: self::barFromEnv), core::bool x = const core::bool::fromEnvironment("foo", defaultValue: self::barFromEnv)}) → self::Foo - : self::Foo::value = value, self::Foo::saved2 = saved2, self::Foo::saved = x, super core::Object::•() - ; -} -class A extends core::Object /*hasConstConstructor*/ { - const constructor •() → self::A - : super core::Object::•() - ; - operator unary-() → self::A - ; -} -class B extends core::Object implements self::A /*hasConstConstructor*/ { - const constructor •() → self::B - : super core::Object::•() - ; - operator unary-() → self::B - ; -} -class C extends core::Object implements self::A /*hasConstConstructor*/ { - const constructor •() → self::C - : super core::Object::•() - ; - operator unary-() → self::C - ; -} -class Class extends core::Object /*hasConstConstructor*/ { - const constructor •(self::Class::T t) → self::Class - : super core::Object::•() - ; - const constructor redirect(dynamic t) → self::Class - : this self::Class::•(t as{TypeError,ForDynamic} self::Class::T) - ; - const constructor method(self::Class::T t) → self::Class - : this self::Class::•(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^" in t.{self::A::unary-}(){() → self::A} as{TypeError} Never) - ; -} -class Subclass extends self::Class /*hasConstConstructor*/ { - const constructor •(dynamic t) → self::Subclass - : super self::Class::•(t as{TypeError,ForDynamic} self::Subclass::T) - ; -} -class ConstClassWithF extends core::Object /*hasConstConstructor*/ { - final field (core::int, {named: core::int}) → core::int foo; - const constructor •((core::int, {named: core::int}) → core::int foo) → self::ConstClassWithF - : self::ConstClassWithF::foo = foo, super core::Object::•() - ; -} -static const field core::bool barFromEnv = const core::bool::fromEnvironment("bar"); -static const field core::bool hasBarEnv = const core::bool::hasEnvironment("bar"); -static const field core::bool? barFromEnvOrNull0 = const core::bool::fromEnvironment("bar") ?{core::bool?} true : null; -static const field core::bool barFromEnvOrNull = const core::bool::fromEnvironment("bar", defaultValue: self::barFromEnvOrNull0!); -static const field core::bool notBarFromEnvOrNull = !self::barFromEnvOrNull; -static const field core::bool conditionalOnNull = self::barFromEnvOrNull ?{core::bool} true : false; -static const field core::bool nullAwareOnNull = let final core::bool #t1 = self::barFromEnvOrNull in #t1 == null ?{core::bool} true : #t1; -static const field core::bool andOnNull = self::barFromEnvOrNull && true; -static const field core::bool andOnNull2 = true && self::barFromEnvOrNull; -static const field core::bool orOnNull = self::barFromEnvOrNull || true; -static const field core::bool orOnNull2 = self::barFromEnvOrNull || false; -static const field core::bool orOnNull3 = true || self::barFromEnvOrNull; -static const field core::bool orOnNull4 = false || self::barFromEnvOrNull; -static const field core::int fromDeferredLib = let final dynamic #t2 = CheckLibraryIsLoaded(lib) in var::x; -static const field self::Foo x = const self::Foo::•(42); -static const field core::bool? y = true; -static const field core::bool z = !self::y!; -static const field core::Object maybeInt = const core::bool::fromEnvironment("foo") ?{core::Object} 42 : true; -static const field core::bool isItInt = self::maybeInt is core::int ?{core::bool} true : false; -static const field core::Object maybeInt2 = self::z ?{core::Object} 42 : true; -static const field core::bool isItInt2 = self::maybeInt2 is core::int ?{core::bool} true : false; -static const field core::int? maybeInt3 = self::z ?{core::int?} 42 : null; -static const field core::bool isItInt3 = self::maybeInt3 is core::int ?{core::bool} true : false; -static const field dynamic listOfNull = const [null]; -static const field core::bool isListOfNull = self::listOfNull is core::List; -static const field dynamic listOfInt = const [42]; -static const field core::bool isListOfInt = self::listOfInt is core::List; -static const field core::bool isList = self::listOfInt is core::List; -static const field dynamic setOfInt = const {42}; -static const field core::bool isSetOfInt = self::setOfInt is core::Set; -static const field dynamic mapOfInt = const {42: 42}; -static const field core::bool isMapOfInt = self::mapOfInt is core::Map; -static const field dynamic listOfListOfInt = const >[const [42]]; -static const field core::bool isListOfListOfInt = self::listOfListOfInt is core::List>; -static const field dynamic setOfSetOfInt = const >{const {42}}; -static const field core::bool isSetOfSetOfInt = self::setOfSetOfInt is core::Set>; -static const field dynamic mapOfMapOfInt1 = const , core::int>{const {42: 42}: 42}; -static const field dynamic mapOfMapOfInt2 = const >{42: const {42: 42}}; -static const field core::bool isMapOfMapOfInt1 = self::mapOfMapOfInt1 is core::Map, core::int>; -static const field core::bool isMapOfMapOfInt2 = self::mapOfMapOfInt2 is core::Map>; -static const field core::Symbol symbolWithUnevaluatedParameter = const _in::Symbol::•(const core::String::fromEnvironment("foo")); -static const field core::Symbol symbolWithInvalidName = const _in::Symbol::•("42"); -static const field self::Class? c0 = const core::bool::fromEnvironment("x") ?{self::Class?} null : const self::Class::redirect(const self::C::•()); -static const field self::Class? c1 = const core::bool::fromEnvironment("x") ?{self::Class?} null : const self::Class::method(const self::A::•()); -static const field self::Subclass? c2 = const core::bool::fromEnvironment("x") ?{self::Subclass?} null : const self::Subclass::•(const self::C::•()); -static const field self::Class? c3 = const core::bool::fromEnvironment("x") ?{self::Class?} null : const self::Class::•(const self::A::•()); -static const field self::Class? c4 = const core::bool::fromEnvironment("x") ?{self::Class?} null : const self::Class::redirect(const self::B::•()); -static const field self::Subclass? c5 = const core::bool::fromEnvironment("x") ?{self::Subclass?} null : const self::Subclass::•(const self::A::•()); -static const field self::Subclass? c6 = const core::bool::fromEnvironment("x") ?{self::Subclass?} null : const self::Subclass::•(const self::B::•()); -static const field core::Type f = (core::int, {named: core::int}) → core::int; -static field self::ConstClassWithF constClassWithF1; -static const field self::ConstClassWithF constClassWithF2 = const self::ConstClassWithF::•(self::procedure); -static const field core::bool unevaluatedBool = const core::bool::fromEnvironment("foo"); -static const field core::bool notUnevaluatedBool = !self::unevaluatedBool; -static const field core::bool? unevaluatedBoolOrNull = const core::bool::fromEnvironment("bar") ?{core::bool?} self::unevaluatedBool : null; -static const field core::bool unevaluatedBoolNotNull = self::unevaluatedBoolOrNull!; -static method procedure(core::int i, {core::int named}) → core::int - ; -static method main() → dynamic - ; - -library; -import self as var; -import "dart:core" as core; - -static const field core::int x = 42; - - -Extra constant evaluation status: -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:33:17 -> BoolConstant(false) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///various.dart:33:59 -> BoolConstant(false) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:34:22 -> BoolConstant(false) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///various.dart:34:64 -> BoolConstant(false) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:7:31 -> BoolConstant(false) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:8:30 -> BoolConstant(false) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various.dart:9:67 -> NullConstant(null) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:9:39 -> BoolConstant(false) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///various.dart:11:53 -> NullConstant(null) -Evaluated: LogicalExpression @ org-dartlang-testcase:///various.dart:19:29 -> BoolConstant(true) -Evaluated: StaticGet @ org-dartlang-testcase:///various.dart:22:29 -> IntConstant(42) -Evaluated with empty environment: ConstructorInvocation @ org-dartlang-testcase:///various.dart:38:17 -> InstanceConstant(const Foo{Foo.saved: false, Foo.saved2: false, Foo.initialized: null, Foo.value: 42}) -Evaluated: Not @ org-dartlang-testcase:///various.dart:41:16 -> BoolConstant(false) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various.dart:43:46 -> BoolConstant(true) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:43:23 -> BoolConstant(false) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various.dart:44:38 -> BoolConstant(false) -Evaluated with empty environment: IsExpression @ org-dartlang-testcase:///various.dart:44:31 -> BoolConstant(false) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///various.dart:44:22 -> BoolConstant(true) -Evaluated: ConditionalExpression @ org-dartlang-testcase:///various.dart:45:21 -> BoolConstant(true) -Evaluated: ConditionalExpression @ org-dartlang-testcase:///various.dart:46:40 -> BoolConstant(false) -Evaluated: ConditionalExpression @ org-dartlang-testcase:///various.dart:47:21 -> NullConstant(null) -Evaluated: ConditionalExpression @ org-dartlang-testcase:///various.dart:48:40 -> BoolConstant(false) -Evaluated: ListLiteral @ org-dartlang-testcase:///various.dart:50:28 -> ListConstant(const [null]) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:51:38 -> BoolConstant(true) -Evaluated: ListLiteral @ org-dartlang-testcase:///various.dart:52:27 -> ListConstant(const [42]) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:53:36 -> BoolConstant(true) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:54:31 -> BoolConstant(true) -Evaluated: SetLiteral @ org-dartlang-testcase:///various.dart:55:26 -> SetConstant(const {42}) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:56:34 -> BoolConstant(true) -Evaluated: MapLiteral @ org-dartlang-testcase:///various.dart:57:26 -> MapConstant(const {42: 42}) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:58:34 -> BoolConstant(true) -Evaluated: ListLiteral @ org-dartlang-testcase:///various.dart:59:33 -> ListConstant(const >[const [42]]) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:62:48 -> BoolConstant(true) -Evaluated: SetLiteral @ org-dartlang-testcase:///various.dart:63:31 -> SetConstant(const >{const {42}}) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:66:44 -> BoolConstant(true) -Evaluated: MapLiteral @ org-dartlang-testcase:///various.dart:67:32 -> MapConstant(const , int>{const {42: 42}: 42}) -Evaluated: MapLiteral @ org-dartlang-testcase:///various.dart:70:32 -> MapConstant(const >{42: const {42: 42}}) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:73:46 -> BoolConstant(true) -Evaluated: IsExpression @ org-dartlang-testcase:///various.dart:74:46 -> BoolConstant(true) -Evaluated with empty environment: ConstructorInvocation @ org-dartlang-testcase:///various.dart:77:11 -> SymbolConstant(#) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:77:25 -> StringConstant("") -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:78:44 -> SymbolConstant(#42) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:108:17 -> BoolConstant(false) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:108:71 -> InstanceConstant(const C{}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:109:17 -> BoolConstant(false) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:109:69 -> InstanceConstant(const A{}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:110:17 -> BoolConstant(false) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:110:65 -> InstanceConstant(const C{}) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various.dart:111:38 -> InstanceConstant(const Class{}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:111:17 -> BoolConstant(false) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:111:53 -> InstanceConstant(const Class{}) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various.dart:112:38 -> InstanceConstant(const Class{}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:112:17 -> BoolConstant(false) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:112:53 -> InstanceConstant(const Class{}) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various.dart:113:38 -> InstanceConstant(const Subclass{}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:113:17 -> BoolConstant(false) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:113:53 -> InstanceConstant(const Subclass{}) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various.dart:114:38 -> InstanceConstant(const Subclass{}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:114:17 -> BoolConstant(false) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:114:53 -> InstanceConstant(const Subclass{}) -Evaluated: TypeLiteral @ org-dartlang-testcase:///various.dart:117:11 -> TypeLiteralConstant(int Function(int, {named: int})) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various.dart:126:48 -> InstanceConstant(const ConstClassWithF{ConstClassWithF.foo: procedure}) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:128:35 -> BoolConstant(false) -Evaluated with empty environment: Not @ org-dartlang-testcase:///various.dart:129:33 -> BoolConstant(true) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///various.dart:129:34 -> BoolConstant(false) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various.dart:131:33 -> NullConstant(null) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various.dart:131:10 -> BoolConstant(false) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///various.dart:131:35 -> BoolConstant(false) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///various.dart:132:37 -> NullConstant(null) -Extra constant evaluation: evaluated: 108, effectively constant: 69 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect deleted file mode 100644 index fb6032da308b..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect +++ /dev/null @@ -1,308 +0,0 @@ -library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:27:3: Error: Only static fields can be declared as const. -// Try using 'final' instead of 'const', or adding the keyword 'static'. -// const bool initialized = -// ^^^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:25: Error: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. -// Try moving the constant from the deferred library, or removing 'deferred' from the import. -// -// const fromDeferredLib = lib.x; -// ^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. -// - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. -// const Class.method(T t) : this(-t); -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:124:27: Error: The parameter 'named' can't have a value of 'null' because of its type 'int', but the implicit default value is 'null'. -// Try adding either an explicit non-'null' default value or the 'required' modifier. -// int procedure(int i, {int named}) => i; -// ^^^^^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:31:9: Error: Constructor is marked 'const' so all fields must be final. -// const Foo(this.value, -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:27:14: Context: Field isn't final, but constructor is 'const'. -// const bool initialized = -// ^ -// -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Error: Constant evaluation error: -// const fromDeferredLib = lib.x; -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Context: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. -// Try moving the constant from the deferred library, or removing 'deferred' from the import. -// -// const fromDeferredLib = lib.x; -// ^ -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:7: Context: While analyzing: -// const fromDeferredLib = lib.x; -// ^ -// -import self as self; -import "dart:core" as core; -import "dart:_internal" as _in; - -import "org-dartlang-testcase:///various_lib.dart" deferred as lib; - -typedef F = (core::int, {named: core::int}) → core::int; -class Foo extends core::Object /*hasConstConstructor*/ { - final field core::bool saved; - final field core::bool saved2; - field core::bool initialized = #C4; - final field self::Foo::E% value; - const constructor •(self::Foo::E% value, {core::bool saved2 = #C5, core::bool x = #C6}) → self::Foo - : self::Foo::value = value, self::Foo::saved2 = saved2, self::Foo::saved = x, super core::Object::•() - ; -} -class A extends core::Object /*hasConstConstructor*/ { - const constructor •() → self::A - : super core::Object::•() - ; - operator unary-() → self::A - return this; -} -class B extends core::Object implements self::A /*hasConstConstructor*/ { - const constructor •() → self::B - : super core::Object::•() - ; - operator unary-() → self::B - return this; -} -class C extends core::Object implements self::A /*hasConstConstructor*/ { - const constructor •() → self::C - : super core::Object::•() - ; - operator unary-() → self::C - return this; -} -class Class extends core::Object /*hasConstConstructor*/ { - const constructor •(self::Class::T t) → self::Class - : super core::Object::•() - ; - const constructor redirect(dynamic t) → self::Class - : this self::Class::•(t as{TypeError,ForDynamic} self::Class::T) - ; - const constructor method(self::Class::T t) → self::Class - : this self::Class::•(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^" in t.{self::A::unary-}(){() → self::A} as{TypeError} Never) - ; -} -class Subclass extends self::Class /*hasConstConstructor*/ { - const constructor •(dynamic t) → self::Subclass - : super self::Class::•(t as{TypeError,ForDynamic} self::Subclass::T) - ; -} -class ConstClassWithF extends core::Object /*hasConstConstructor*/ { - final field (core::int, {named: core::int}) → core::int foo; - const constructor •((core::int, {named: core::int}) → core::int foo) → self::ConstClassWithF - : self::ConstClassWithF::foo = foo, super core::Object::•() - ; -} -static const field core::bool barFromEnv = #C3; -static const field core::bool hasBarEnv = #C7; -static const field core::bool? barFromEnvOrNull0 = #C11; -static const field core::bool barFromEnvOrNull = #C13; -static const field core::bool notBarFromEnvOrNull = #C14; -static const field core::bool conditionalOnNull = #C16; -static const field core::bool nullAwareOnNull = #C18; -static const field core::bool andOnNull = #C19; -static const field core::bool andOnNull2 = #C13; -static const field core::bool orOnNull = #C20; -static const field core::bool orOnNull2 = #C21; -static const field core::bool orOnNull3 = #C9; -static const field core::bool orOnNull4 = #C13; -static const field core::int fromDeferredLib = invalid-expression "'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded."; -static const field self::Foo x = #C23; -static const field core::bool? y = #C9; -static const field core::bool z = #C15; -static const field core::Object maybeInt = #C25; -static const field core::bool isItInt = #C27; -static const field core::Object maybeInt2 = #C9; -static const field core::bool isItInt2 = #C15; -static const field core::int? maybeInt3 = #C10; -static const field core::bool isItInt3 = #C15; -static const field dynamic listOfNull = #C28; -static const field core::bool isListOfNull = #C9; -static const field dynamic listOfInt = #C29; -static const field core::bool isListOfInt = #C9; -static const field core::bool isList = #C9; -static const field dynamic setOfInt = #C30; -static const field core::bool isSetOfInt = #C9; -static const field dynamic mapOfInt = #C31; -static const field core::bool isMapOfInt = #C9; -static const field dynamic listOfListOfInt = #C32; -static const field core::bool isListOfListOfInt = #C9; -static const field dynamic setOfSetOfInt = #C33; -static const field core::bool isSetOfSetOfInt = #C9; -static const field dynamic mapOfMapOfInt1 = #C34; -static const field dynamic mapOfMapOfInt2 = #C35; -static const field core::bool isMapOfMapOfInt1 = #C9; -static const field core::bool isMapOfMapOfInt2 = #C9; -static const field core::Symbol symbolWithUnevaluatedParameter = #C37; -static const field core::Symbol symbolWithInvalidName = #C38; -static const field self::Class? c0 = #C44; -static const field self::Class? c1 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^"; -static const field self::Subclass? c2 = #C49; -static const field self::Class? c3 = #C53; -static const field self::Class? c4 = #C58; -static const field self::Subclass? c5 = #C63; -static const field self::Subclass? c6 = #C68; -static const field core::Type f = #C69; -static field self::ConstClassWithF constClassWithF1 = #C71; -static const field self::ConstClassWithF constClassWithF2 = #C71; -static const field core::bool unevaluatedBool = #C72; -static const field core::bool notUnevaluatedBool = #C73; -static const field core::bool? unevaluatedBoolOrNull = #C75; -static const field core::bool unevaluatedBoolNotNull = #C76; -static method procedure(core::int i, {core::int named = #C10}) → core::int - return i; -static method main() → dynamic { - core::print(#C44); - core::print(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. - - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. - const Class.method(T t) : this(-t); - ^"); - core::print(#C49); - core::print(#C53); - core::print(#C58); - core::print(#C63); - core::print(#C68); - core::print(#C23); - core::print(#C23.{self::Foo::saved}{core::bool}); - core::print(#C23.{self::Foo::value}{core::int}); -} - -library; -import self as self2; -import "dart:core" as core; - -static const field core::int x = #C22; - -constants { - #C1 = "foo" - #C2 = "bar" - #C3 = eval const core::bool::fromEnvironment(#C2) - #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C6 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3) - #C7 = eval const core::bool::hasEnvironment(#C2) - #C8 = eval const core::bool::fromEnvironment(#C2) - #C9 = true - #C10 = null - #C11 = eval #C8 ?{core::bool?} #C9 : #C10 - #C12 = eval #C11! - #C13 = eval const core::bool::fromEnvironment(#C2, defaultValue: #C12) - #C14 = eval !#C13 - #C15 = false - #C16 = eval #C13 ?{core::bool} #C9 : #C15 - #C17 = eval #C13 == null - #C18 = eval #C17 ?{core::bool} #C9 : #C13 - #C19 = eval #C13 && #C9 - #C20 = eval #C13 || #C9 - #C21 = eval #C13 || #C15 - #C22 = 42 - #C23 = eval self::Foo{saved:#C6, saved2:#C5, initialized:#C4, value:#C22} - #C24 = eval const core::bool::fromEnvironment(#C1) - #C25 = eval #C24 ?{core::Object} #C22 : #C9 - #C26 = eval #C25 is core::int - #C27 = eval #C26 ?{core::bool} #C9 : #C15 - #C28 = [#C10] - #C29 = [#C22] - #C30 = {#C22} - #C31 = {#C22:#C22} - #C32 = >[#C29] - #C33 = >{#C30} - #C34 = , core::int>{#C31:#C22} - #C35 = >{#C22:#C31} - #C36 = eval const core::String::fromEnvironment(#C1) - #C37 = eval const _in::Symbol::•(#C36) - #C38 = #42 - #C39 = "x" - #C40 = eval const core::bool::fromEnvironment(#C39) - #C41 = eval self::C{} - #C42 = eval #C41 as self::B - #C43 = eval self::Class{#C42} - #C44 = eval #C40 ?{self::Class?} #C10 : #C43 - #C45 = eval const core::bool::fromEnvironment(#C39) - #C46 = eval self::C{} - #C47 = eval #C46 as self::B - #C48 = eval self::Subclass{#C47} - #C49 = eval #C45 ?{self::Subclass?} #C10 : #C48 - #C50 = eval const core::bool::fromEnvironment(#C39) - #C51 = eval self::A{} - #C52 = eval self::Class{#C51} - #C53 = eval #C50 ?{self::Class?} #C10 : #C52 - #C54 = eval const core::bool::fromEnvironment(#C39) - #C55 = eval self::B{} - #C56 = eval #C55 as self::B - #C57 = eval self::Class{#C56} - #C58 = eval #C54 ?{self::Class?} #C10 : #C57 - #C59 = eval const core::bool::fromEnvironment(#C39) - #C60 = eval self::A{} - #C61 = eval #C60 as self::A - #C62 = eval self::Subclass{#C61} - #C63 = eval #C59 ?{self::Subclass?} #C10 : #C62 - #C64 = eval const core::bool::fromEnvironment(#C39) - #C65 = eval self::B{} - #C66 = eval #C65 as self::B - #C67 = eval self::Subclass{#C66} - #C68 = eval #C64 ?{self::Subclass?} #C10 : #C67 - #C69 = TypeLiteralConstant((core::int, {named: core::int}) → core::int) - #C70 = static-tearoff self::procedure - #C71 = self::ConstClassWithF {foo:#C70} - #C72 = eval const core::bool::fromEnvironment(#C1) - #C73 = eval !#C72 - #C74 = eval const core::bool::fromEnvironment(#C2) - #C75 = eval #C74 ?{core::bool?} #C72 : #C10 - #C76 = eval #C75! -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:33:17 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:34:22 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:28:13 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:138:9 -> InstanceConstant(const Class{}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:139:9 -> InstanceConstant(const Class{}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:140:9 -> InstanceConstant(const Subclass{}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:141:9 -> InstanceConstant(const Subclass{}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:142:9 -> InstanceConstant(const Foo{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:143:9 -> InstanceConstant(const Foo{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:144:9 -> InstanceConstant(const Foo{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:7:31 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:8:30 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:9:67 -> NullConstant(null) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:38:17 -> InstanceConstant(const Foo{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:43:46 -> BoolConstant(true) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:44:38 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:77:11 -> SymbolConstant(#) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:111:38 -> InstanceConstant(const Class{}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:112:38 -> InstanceConstant(const Class{}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:113:38 -> InstanceConstant(const Subclass{}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:114:38 -> InstanceConstant(const Subclass{}) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:128:35 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:129:33 -> BoolConstant(true) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:131:33 -> NullConstant(null) -Extra constant evaluation: evaluated: 62, effectively constant: 24 - - -Constructor coverage from constants: -org-dartlang-testcase:///various.dart: -- C. (from org-dartlang-testcase:///various.dart:93:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) -- Class.redirect (from org-dartlang-testcase:///various.dart:100:9) -- Class. (from org-dartlang-testcase:///various.dart:99:9) -- A. (from org-dartlang-testcase:///various.dart:81:9) -- Class.method (from org-dartlang-testcase:///various.dart:101:9) -- Subclass. (from org-dartlang-testcase:///various.dart:105:9) -- B. (from org-dartlang-testcase:///various.dart:87:9) -- Foo. (from org-dartlang-testcase:///various.dart:31:9) -- ConstClassWithF. (from org-dartlang-testcase:///various.dart:121:9) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.textual_outline.expect deleted file mode 100644 index a48b2fb8b792..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.textual_outline.expect +++ /dev/null @@ -1,173 +0,0 @@ -import "various_lib.dart" deferred as lib; - -const bool barFromEnv = const bool.fromEnvironment("bar"); - -const bool hasBarEnv = const bool.hasEnvironment("bar"); - -const bool? barFromEnvOrNull0 = const bool.fromEnvironment("bar") ? true : null; - -const bool barFromEnvOrNull = - const bool.fromEnvironment("bar", defaultValue: barFromEnvOrNull0!); - -const bool notBarFromEnvOrNull = !barFromEnvOrNull; - -const bool conditionalOnNull = barFromEnvOrNull ? true : false; - -const bool nullAwareOnNull = barFromEnvOrNull ?? true; - -const bool andOnNull = barFromEnvOrNull && true; - -const bool andOnNull2 = true && barFromEnvOrNull; - -const bool orOnNull = barFromEnvOrNull || true; - -const bool orOnNull2 = barFromEnvOrNull || false; - -const bool orOnNull3 = true || barFromEnvOrNull; - -const bool orOnNull4 = false || barFromEnvOrNull; - -const fromDeferredLib = lib.x; - -class Foo { - final bool saved; - final bool saved2; - const bool initialized = - const bool.fromEnvironment("foo", defaultValue: barFromEnv); - final E value; - const Foo(this.value, - {this.saved2 = - const bool.fromEnvironment("foo", defaultValue: barFromEnv), - bool x = const bool.fromEnvironment("foo", defaultValue: barFromEnv)}) - : saved = x; -} - -const x = const Foo(42); - -const bool? y = true; - -const bool z = !(y!); - -const maybeInt = bool.fromEnvironment("foo") ? 42 : true; - -const bool isItInt = maybeInt is int ? true : false; - -const maybeInt2 = z ? 42 : true; - -const bool isItInt2 = maybeInt2 is int ? true : false; - -const maybeInt3 = z ? 42 : null; - -const bool isItInt3 = maybeInt3 is int ? true : false; - -const dynamic listOfNull = [null]; - -const bool isListOfNull = listOfNull is List; - -const dynamic listOfInt = [42]; - -const bool isListOfInt = listOfInt is List; - -const bool isList = listOfInt is List; - -const dynamic setOfInt = {42}; - -const bool isSetOfInt = setOfInt is Set; - -const dynamic mapOfInt = {42: 42}; - -const bool isMapOfInt = mapOfInt is Map; - -const dynamic listOfListOfInt = [ - [42] -]; - -const bool isListOfListOfInt = listOfListOfInt is List>; - -const dynamic setOfSetOfInt = { - {42} -}; - -const bool isSetOfSetOfInt = setOfSetOfInt is Set>; - -const dynamic mapOfMapOfInt1 = { - {42: 42}: 42 -}; - -const dynamic mapOfMapOfInt2 = { - 42: {42: 42} -}; - -const bool isMapOfMapOfInt1 = mapOfMapOfInt1 is Map, int>; - -const bool isMapOfMapOfInt2 = mapOfMapOfInt2 is Map>; - -const Symbol symbolWithUnevaluatedParameter = - const Symbol(String.fromEnvironment("foo")); - -const Symbol symbolWithInvalidName = const Symbol("42"); - -class A { - const A(); - A operator -() => this; -} - -class B implements A { - const B(); - B operator -() => this; -} - -class C implements A { - const C(); - C operator -() => this; -} - -class Class { - const Class(T t); - const Class.redirect(dynamic t) : this(t); - const Class.method(T t) : this(-t); -} - -class Subclass extends Class { - const Subclass(dynamic t) : super(t); -} - -const c0 = bool.fromEnvironment("x") ? null : const Class.redirect(C()); - -const c1 = bool.fromEnvironment("x") ? null : const Class.method(A()); - -const c2 = bool.fromEnvironment("x") ? null : const Subclass(C()); - -const c3 = bool.fromEnvironment("x") ? null : const Class(A()); - -const c4 = bool.fromEnvironment("x") ? null : const Class.redirect(B()); - -const c5 = bool.fromEnvironment("x") ? null : const Subclass(A()); - -const c6 = bool.fromEnvironment("x") ? null : const Subclass(B()); - -typedef F = int Function(int, {int named}); - -const f = F; - -class ConstClassWithF { - final F foo; - const ConstClassWithF(this.foo); -} - -int procedure(int i, {int named}) => i; - -ConstClassWithF constClassWithF1 = const ConstClassWithF(procedure); - -const ConstClassWithF constClassWithF2 = const ConstClassWithF(procedure); - -const bool unevaluatedBool = bool.fromEnvironment("foo"); - -const bool notUnevaluatedBool = !unevaluatedBool; - -const bool? unevaluatedBoolOrNull = - bool.fromEnvironment("bar") ? unevaluatedBool : null; - -const bool unevaluatedBoolNotNull = unevaluatedBoolOrNull!; - -main() {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.textual_outline_modelled.expect deleted file mode 100644 index 9964df3a651e..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,173 +0,0 @@ -import "various_lib.dart" deferred as lib; - -ConstClassWithF constClassWithF1 = const ConstClassWithF(procedure); - -class A { - A operator -() => this; - const A(); -} - -class B implements A { - B operator -() => this; - const B(); -} - -class C implements A { - C operator -() => this; - const C(); -} - -class Class { - const Class(T t); - const Class.method(T t) : this(-t); - const Class.redirect(dynamic t) : this(t); -} - -class ConstClassWithF { - const ConstClassWithF(this.foo); - final F foo; -} - -class Foo { - const Foo(this.value, - {this.saved2 = - const bool.fromEnvironment("foo", defaultValue: barFromEnv), - bool x = const bool.fromEnvironment("foo", defaultValue: barFromEnv)}) - : saved = x; - const bool initialized = - const bool.fromEnvironment("foo", defaultValue: barFromEnv); - final E value; - final bool saved; - final bool saved2; -} - -class Subclass extends Class { - const Subclass(dynamic t) : super(t); -} - -const ConstClassWithF constClassWithF2 = const ConstClassWithF(procedure); - -const Symbol symbolWithInvalidName = const Symbol("42"); - -const Symbol symbolWithUnevaluatedParameter = - const Symbol(String.fromEnvironment("foo")); - -const bool? barFromEnvOrNull0 = const bool.fromEnvironment("bar") ? true : null; - -const bool? unevaluatedBoolOrNull = - bool.fromEnvironment("bar") ? unevaluatedBool : null; - -const bool? y = true; - -const bool andOnNull = barFromEnvOrNull && true; - -const bool andOnNull2 = true && barFromEnvOrNull; - -const bool barFromEnv = const bool.fromEnvironment("bar"); - -const bool barFromEnvOrNull = - const bool.fromEnvironment("bar", defaultValue: barFromEnvOrNull0!); - -const bool conditionalOnNull = barFromEnvOrNull ? true : false; - -const bool hasBarEnv = const bool.hasEnvironment("bar"); - -const bool isItInt = maybeInt is int ? true : false; - -const bool isItInt2 = maybeInt2 is int ? true : false; - -const bool isItInt3 = maybeInt3 is int ? true : false; - -const bool isList = listOfInt is List; - -const bool isListOfInt = listOfInt is List; - -const bool isListOfListOfInt = listOfListOfInt is List>; - -const bool isListOfNull = listOfNull is List; - -const bool isMapOfInt = mapOfInt is Map; - -const bool isMapOfMapOfInt1 = mapOfMapOfInt1 is Map, int>; - -const bool isMapOfMapOfInt2 = mapOfMapOfInt2 is Map>; - -const bool isSetOfInt = setOfInt is Set; - -const bool isSetOfSetOfInt = setOfSetOfInt is Set>; - -const bool notBarFromEnvOrNull = !barFromEnvOrNull; - -const bool notUnevaluatedBool = !unevaluatedBool; - -const bool nullAwareOnNull = barFromEnvOrNull ?? true; - -const bool orOnNull = barFromEnvOrNull || true; - -const bool orOnNull2 = barFromEnvOrNull || false; - -const bool orOnNull3 = true || barFromEnvOrNull; - -const bool orOnNull4 = false || barFromEnvOrNull; - -const bool unevaluatedBool = bool.fromEnvironment("foo"); - -const bool unevaluatedBoolNotNull = unevaluatedBoolOrNull!; - -const bool z = !(y!); - -const c0 = bool.fromEnvironment("x") ? null : const Class.redirect(C()); - -const c1 = bool.fromEnvironment("x") ? null : const Class.method(A()); - -const c2 = bool.fromEnvironment("x") ? null : const Subclass(C()); - -const c3 = bool.fromEnvironment("x") ? null : const Class(A()); - -const c4 = bool.fromEnvironment("x") ? null : const Class.redirect(B()); - -const c5 = bool.fromEnvironment("x") ? null : const Subclass(A()); - -const c6 = bool.fromEnvironment("x") ? null : const Subclass(B()); - -const dynamic listOfInt = [42]; - -const dynamic listOfListOfInt = [ - [42] -]; - -const dynamic listOfNull = [null]; - -const dynamic mapOfInt = {42: 42}; - -const dynamic mapOfMapOfInt1 = { - {42: 42}: 42 -}; - -const dynamic mapOfMapOfInt2 = { - 42: {42: 42} -}; - -const dynamic setOfInt = {42}; - -const dynamic setOfSetOfInt = { - {42} -}; - -const f = F; - -const fromDeferredLib = lib.x; - -const maybeInt = bool.fromEnvironment("foo") ? 42 : true; - -const maybeInt2 = z ? 42 : true; - -const maybeInt3 = z ? 42 : null; - -const x = const Foo(42); - -int procedure(int i, {int named}) => i; - -main() {} - -typedef F = int Function(int, {int named}); diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart deleted file mode 100644 index f8da5a422f99..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'various_2_lib.dart' as lib; - -typedef F1 = T Function(T); -typedef F2 = T Function(T); - -const objectTypeLiteral = Object; -const int Function(int) partialInstantiation = lib.id1; -const instance = const lib.Class(0); -const instance2 = const lib.Class([42]); - -const functionTypeLiteral = F1; -const genericFunctionTypeLiteral = F2; -const listLiteral = [0]; -const listLiteral2 = [ - [42] -]; -const setLiteral = {0}; -const setLiteral2 = { - [42] -}; -const mapLiteral = {0: 'foo'}; -const mapLiteral2 = { - [42]: 'foo', - null: [42] -}; -const listConcatenation = [...listLiteral]; -const setConcatenation = {...setLiteral}; -const mapConcatenation = {...mapLiteral}; - -const objectTypeLiteralIdentical = - identical(objectTypeLiteral, lib.objectTypeLiteral); -const partialInstantiationIdentical = - identical(partialInstantiation, lib.partialInstantiation); -const instanceIdentical = identical(instance, lib.instance); -const instance2Identical = identical(instance2, lib.instance2); -const functionTypeLiteralIdentical = - identical(functionTypeLiteral, lib.functionTypeLiteral); -const genericFunctionTypeLiteralIdentical = - identical(genericFunctionTypeLiteral, lib.genericFunctionTypeLiteral); -const listLiteralIdentical = identical(listLiteral, lib.listLiteral); -const listLiteral2Identical = identical(listLiteral2, lib.listLiteral2); -const setLiteralIdentical = identical(setLiteral, lib.setLiteral); -const setLiteral2Identical = identical(setLiteral2, lib.setLiteral2); -const mapLiteralIdentical = identical(mapLiteral, lib.mapLiteral); -const mapLiteral2Identical = identical(mapLiteral2, lib.mapLiteral2); -const listConcatenationIdentical = - identical(listConcatenation, lib.listConcatenation); -const setConcatenationIdentical = - identical(setConcatenation, lib.setConcatenation); -const mapConcatenationIdentical = - identical(mapConcatenation, lib.mapConcatenation); - -main() { - test(objectTypeLiteral, lib.objectTypeLiteral); - test(partialInstantiation, lib.partialInstantiation); - test(instance, lib.instance); - test(functionTypeLiteral, lib.functionTypeLiteral); - test(genericFunctionTypeLiteral, lib.genericFunctionTypeLiteral); - test(listLiteral, lib.listLiteral); - test(setLiteral, lib.setLiteral); - test(mapLiteral, lib.mapLiteral); - test(listConcatenation, lib.listConcatenation); - test(setConcatenation, lib.setConcatenation); - test(mapConcatenation, lib.mapConcatenation); - - test(true, objectTypeLiteralIdentical); - test(true, partialInstantiationIdentical); - test(true, instanceIdentical); - test(true, functionTypeLiteralIdentical); - test(true, genericFunctionTypeLiteralIdentical); - test(true, listLiteralIdentical); - test(true, setLiteralIdentical); - test(true, mapLiteralIdentical); - test(true, listConcatenationIdentical); - test(true, setConcatenationIdentical); - test(true, mapConcatenationIdentical); -} - -test(expected, actual) { - print('test($expected, $actual)'); - if (!identical(expected, actual)) { - throw 'Expected $expected, actual $actual'; - } -} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.expect deleted file mode 100644 index d12b0e4ce3c7..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.expect +++ /dev/null @@ -1,141 +0,0 @@ -library; -import self as self; -import "dart:core" as core; -import "various_2_lib.dart" as var; - -import "org-dartlang-testcase:///various_2_lib.dart" as lib; - -typedef F1 = (T%) → T%; -typedef F2 = (T%) → T%; -static const field core::Type objectTypeLiteral = #C1; -static const field (core::int) → core::int partialInstantiation = #C3; -static const field var::Class instance = #C5; -static const field var::Class instance2 = #C8; -static const field core::Type functionTypeLiteral = #C9; -static const field core::Type genericFunctionTypeLiteral = #C10; -static const field core::List listLiteral = #C11; -static const field core::List listLiteral2 = #C12; -static const field core::Set setLiteral = #C13; -static const field core::Set setLiteral2 = #C14; -static const field core::Map mapLiteral = #C16; -static const field core::Map mapLiteral2 = #C18; -static const field core::List listConcatenation = #C11; -static const field core::Set setConcatenation = #C13; -static const field core::Map mapConcatenation = #C16; -static const field core::bool objectTypeLiteralIdentical = #C19; -static const field core::bool partialInstantiationIdentical = #C25; -static const field core::bool instanceIdentical = #C19; -static const field core::bool instance2Identical = #C19; -static const field core::bool functionTypeLiteralIdentical = #C19; -static const field core::bool genericFunctionTypeLiteralIdentical = #C19; -static const field core::bool listLiteralIdentical = #C19; -static const field core::bool listLiteral2Identical = #C19; -static const field core::bool setLiteralIdentical = #C19; -static const field core::bool setLiteral2Identical = #C19; -static const field core::bool mapLiteralIdentical = #C19; -static const field core::bool mapLiteral2Identical = #C19; -static const field core::bool listConcatenationIdentical = #C19; -static const field core::bool setConcatenationIdentical = #C19; -static const field core::bool mapConcatenationIdentical = #C19; -static method main() → dynamic { - self::test(#C1, #C1); - self::test(#C3, #C24); - self::test(#C5, #C5); - self::test(#C9, #C9); - self::test(#C10, #C10); - self::test(#C11, #C11); - self::test(#C13, #C13); - self::test(#C16, #C16); - self::test(#C11, #C11); - self::test(#C13, #C13); - self::test(#C16, #C16); - self::test(true, #C19); - self::test(true, #C25); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); -} -static method test(dynamic expected, dynamic actual) → dynamic { - core::print("test(${expected}, ${actual})"); - if(!core::identical(expected, actual)) { - throw "Expected ${expected}, actual ${actual}"; - } -} - -library; -import self as var; -import "dart:core" as core; - -typedef F1 = (T%) → T%; -typedef F2 = (T%) → T%; -class Class extends core::Object /*hasConstConstructor*/ { - final field var::Class::T% field; - const constructor •(var::Class::T% field) → var::Class - : var::Class::field = field, super core::Object::•() - ; -} -static const field core::Type objectTypeLiteral = #C1; -static const field (core::Object?, core::Object?) → core::bool c2 = #C26; -static const field (core::int) → core::int partialInstantiation = #C24; -static const field var::Class instance = #C5; -static const field var::Class instance2 = #C8; -static const field core::Type functionTypeLiteral = #C9; -static const field core::Type genericFunctionTypeLiteral = #C10; -static const field core::List listLiteral = #C11; -static const field core::List listLiteral2 = #C12; -static const field core::Set setLiteral = #C13; -static const field core::Set setLiteral2 = #C14; -static const field core::Map mapLiteral = #C16; -static const field core::Map mapLiteral2 = #C18; -static const field core::List listConcatenation = #C11; -static const field core::Set setConcatenation = #C13; -static const field core::Map mapConcatenation = #C16; -static method id1(var::id1::T% t) → var::id1::T% - return t; -static method id2(var::id2::T% t) → var::id2::T% - return t; - -constants { - #C1 = TypeLiteralConstant(core::Object) - #C2 = static-tearoff var::id1 - #C3 = instantiation #C2 - #C4 = 0 - #C5 = var::Class {field:#C4} - #C6 = 42 - #C7 = [#C6] - #C8 = var::Class {field:#C7} - #C9 = TypeLiteralConstant((dynamic) → dynamic) - #C10 = TypeLiteralConstant((T%) → T%) - #C11 = [#C4] - #C12 = [#C7] - #C13 = {#C4} - #C14 = {#C7} - #C15 = "foo" - #C16 = {#C4:#C15} - #C17 = null - #C18 = {#C7:#C15, #C17:#C7} - #C19 = true - #C20 = eval const core::bool::fromEnvironment(#C15) - #C21 = eval #C2 - #C22 = static-tearoff var::id2 - #C23 = eval #C22 - #C24 = eval #C20 ?{(core::int) → core::int} #C21 : #C23 - #C25 = eval core::identical(#C3, #C24) - #C26 = static-tearoff core::identical -} - - -Constructor coverage from constants: -org-dartlang-testcase:///various_2.dart: -- Class. (from org-dartlang-testcase:///various_2_lib.dart:8:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) - -org-dartlang-testcase:///various_2_lib.dart: -- Class. (from org-dartlang-testcase:///various_2_lib.dart:8:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.modular.expect deleted file mode 100644 index d12b0e4ce3c7..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.modular.expect +++ /dev/null @@ -1,141 +0,0 @@ -library; -import self as self; -import "dart:core" as core; -import "various_2_lib.dart" as var; - -import "org-dartlang-testcase:///various_2_lib.dart" as lib; - -typedef F1 = (T%) → T%; -typedef F2 = (T%) → T%; -static const field core::Type objectTypeLiteral = #C1; -static const field (core::int) → core::int partialInstantiation = #C3; -static const field var::Class instance = #C5; -static const field var::Class instance2 = #C8; -static const field core::Type functionTypeLiteral = #C9; -static const field core::Type genericFunctionTypeLiteral = #C10; -static const field core::List listLiteral = #C11; -static const field core::List listLiteral2 = #C12; -static const field core::Set setLiteral = #C13; -static const field core::Set setLiteral2 = #C14; -static const field core::Map mapLiteral = #C16; -static const field core::Map mapLiteral2 = #C18; -static const field core::List listConcatenation = #C11; -static const field core::Set setConcatenation = #C13; -static const field core::Map mapConcatenation = #C16; -static const field core::bool objectTypeLiteralIdentical = #C19; -static const field core::bool partialInstantiationIdentical = #C25; -static const field core::bool instanceIdentical = #C19; -static const field core::bool instance2Identical = #C19; -static const field core::bool functionTypeLiteralIdentical = #C19; -static const field core::bool genericFunctionTypeLiteralIdentical = #C19; -static const field core::bool listLiteralIdentical = #C19; -static const field core::bool listLiteral2Identical = #C19; -static const field core::bool setLiteralIdentical = #C19; -static const field core::bool setLiteral2Identical = #C19; -static const field core::bool mapLiteralIdentical = #C19; -static const field core::bool mapLiteral2Identical = #C19; -static const field core::bool listConcatenationIdentical = #C19; -static const field core::bool setConcatenationIdentical = #C19; -static const field core::bool mapConcatenationIdentical = #C19; -static method main() → dynamic { - self::test(#C1, #C1); - self::test(#C3, #C24); - self::test(#C5, #C5); - self::test(#C9, #C9); - self::test(#C10, #C10); - self::test(#C11, #C11); - self::test(#C13, #C13); - self::test(#C16, #C16); - self::test(#C11, #C11); - self::test(#C13, #C13); - self::test(#C16, #C16); - self::test(true, #C19); - self::test(true, #C25); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); -} -static method test(dynamic expected, dynamic actual) → dynamic { - core::print("test(${expected}, ${actual})"); - if(!core::identical(expected, actual)) { - throw "Expected ${expected}, actual ${actual}"; - } -} - -library; -import self as var; -import "dart:core" as core; - -typedef F1 = (T%) → T%; -typedef F2 = (T%) → T%; -class Class extends core::Object /*hasConstConstructor*/ { - final field var::Class::T% field; - const constructor •(var::Class::T% field) → var::Class - : var::Class::field = field, super core::Object::•() - ; -} -static const field core::Type objectTypeLiteral = #C1; -static const field (core::Object?, core::Object?) → core::bool c2 = #C26; -static const field (core::int) → core::int partialInstantiation = #C24; -static const field var::Class instance = #C5; -static const field var::Class instance2 = #C8; -static const field core::Type functionTypeLiteral = #C9; -static const field core::Type genericFunctionTypeLiteral = #C10; -static const field core::List listLiteral = #C11; -static const field core::List listLiteral2 = #C12; -static const field core::Set setLiteral = #C13; -static const field core::Set setLiteral2 = #C14; -static const field core::Map mapLiteral = #C16; -static const field core::Map mapLiteral2 = #C18; -static const field core::List listConcatenation = #C11; -static const field core::Set setConcatenation = #C13; -static const field core::Map mapConcatenation = #C16; -static method id1(var::id1::T% t) → var::id1::T% - return t; -static method id2(var::id2::T% t) → var::id2::T% - return t; - -constants { - #C1 = TypeLiteralConstant(core::Object) - #C2 = static-tearoff var::id1 - #C3 = instantiation #C2 - #C4 = 0 - #C5 = var::Class {field:#C4} - #C6 = 42 - #C7 = [#C6] - #C8 = var::Class {field:#C7} - #C9 = TypeLiteralConstant((dynamic) → dynamic) - #C10 = TypeLiteralConstant((T%) → T%) - #C11 = [#C4] - #C12 = [#C7] - #C13 = {#C4} - #C14 = {#C7} - #C15 = "foo" - #C16 = {#C4:#C15} - #C17 = null - #C18 = {#C7:#C15, #C17:#C7} - #C19 = true - #C20 = eval const core::bool::fromEnvironment(#C15) - #C21 = eval #C2 - #C22 = static-tearoff var::id2 - #C23 = eval #C22 - #C24 = eval #C20 ?{(core::int) → core::int} #C21 : #C23 - #C25 = eval core::identical(#C3, #C24) - #C26 = static-tearoff core::identical -} - - -Constructor coverage from constants: -org-dartlang-testcase:///various_2.dart: -- Class. (from org-dartlang-testcase:///various_2_lib.dart:8:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) - -org-dartlang-testcase:///various_2_lib.dart: -- Class. (from org-dartlang-testcase:///various_2_lib.dart:8:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.outline.expect deleted file mode 100644 index 43085af11599..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.outline.expect +++ /dev/null @@ -1,131 +0,0 @@ -library; -import self as self; -import "dart:core" as core; -import "various_2_lib.dart" as var; - -import "org-dartlang-testcase:///various_2_lib.dart" as lib; - -typedef F1 = (T%) → T%; -typedef F2 = (T%) → T%; -static const field core::Type objectTypeLiteral = core::Object; -static const field (core::int) → core::int partialInstantiation = var::id1; -static const field var::Class instance = const var::Class::•(0); -static const field var::Class instance2 = const var::Class::•(const [42]); -static const field core::Type functionTypeLiteral = (dynamic) → dynamic; -static const field core::Type genericFunctionTypeLiteral = (T%) → T%; -static const field core::List listLiteral = const [0]; -static const field core::List listLiteral2 = const [const [42]]; -static const field core::Set setLiteral = const {0}; -static const field core::Set setLiteral2 = const {const [42]}; -static const field core::Map mapLiteral = const {0: "foo"}; -static const field core::Map mapLiteral2 = const {const [42]: "foo", null: const [42]}; -static const field core::List listConcatenation = self::listLiteral; -static const field core::Set setConcatenation = self::setLiteral; -static const field core::Map mapConcatenation = self::mapLiteral; -static const field core::bool objectTypeLiteralIdentical = core::identical(self::objectTypeLiteral, var::objectTypeLiteral); -static const field core::bool partialInstantiationIdentical = core::identical(self::partialInstantiation, var::partialInstantiation); -static const field core::bool instanceIdentical = core::identical(self::instance, var::instance); -static const field core::bool instance2Identical = core::identical(self::instance2, var::instance2); -static const field core::bool functionTypeLiteralIdentical = core::identical(self::functionTypeLiteral, var::functionTypeLiteral); -static const field core::bool genericFunctionTypeLiteralIdentical = core::identical(self::genericFunctionTypeLiteral, var::genericFunctionTypeLiteral); -static const field core::bool listLiteralIdentical = core::identical(self::listLiteral, var::listLiteral); -static const field core::bool listLiteral2Identical = core::identical(self::listLiteral2, var::listLiteral2); -static const field core::bool setLiteralIdentical = core::identical(self::setLiteral, var::setLiteral); -static const field core::bool setLiteral2Identical = core::identical(self::setLiteral2, var::setLiteral2); -static const field core::bool mapLiteralIdentical = core::identical(self::mapLiteral, var::mapLiteral); -static const field core::bool mapLiteral2Identical = core::identical(self::mapLiteral2, var::mapLiteral2); -static const field core::bool listConcatenationIdentical = core::identical(self::listConcatenation, var::listConcatenation); -static const field core::bool setConcatenationIdentical = core::identical(self::setConcatenation, var::setConcatenation); -static const field core::bool mapConcatenationIdentical = core::identical(self::mapConcatenation, var::mapConcatenation); -static method main() → dynamic - ; -static method test(dynamic expected, dynamic actual) → dynamic - ; - -library; -import self as var; -import "dart:core" as core; - -typedef F1 = (T%) → T%; -typedef F2 = (T%) → T%; -class Class extends core::Object /*hasConstConstructor*/ { - final field var::Class::T% field; - const constructor •(var::Class::T% field) → var::Class - : var::Class::field = field, super core::Object::•() - ; -} -static const field core::Type objectTypeLiteral = core::Object; -static const field (core::Object?, core::Object?) → core::bool c2 = core::identical; -static const field (core::int) → core::int partialInstantiation = const core::bool::fromEnvironment("foo") ?{(core::int) → core::int} var::id1 : var::id2; -static const field var::Class instance = const var::Class::•(0); -static const field var::Class instance2 = const var::Class::•(const [42]); -static const field core::Type functionTypeLiteral = (dynamic) → dynamic; -static const field core::Type genericFunctionTypeLiteral = (T%) → T%; -static const field core::List listLiteral = const [0]; -static const field core::List listLiteral2 = const [const [42]]; -static const field core::Set setLiteral = const {0}; -static const field core::Set setLiteral2 = const {const [42]}; -static const field core::Map mapLiteral = const {0: "foo"}; -static const field core::Map mapLiteral2 = const {const [42]: "foo", null: const [42]}; -static const field core::List listConcatenation = var::listLiteral; -static const field core::Set setConcatenation = var::setLiteral; -static const field core::Map mapConcatenation = var::mapLiteral; -static method id1(var::id1::T% t) → var::id1::T% - ; -static method id2(var::id2::T% t) → var::id2::T% - ; - - -Extra constant evaluation status: -Evaluated: TypeLiteral @ org-dartlang-testcase:///various_2.dart:10:27 -> TypeLiteralConstant(Object) -Evaluated: Instantiation @ org-dartlang-testcase:///various_2.dart:11:52 -> InstantiationConstant(id1) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various_2.dart:12:24 -> InstanceConstant(const Class{Class.field: 0}) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various_2.dart:13:25 -> InstanceConstant(const Class{Class.field: const [42]}) -Evaluated: TypeLiteral @ org-dartlang-testcase:///various_2.dart:15:29 -> TypeLiteralConstant(dynamic Function(dynamic)) -Evaluated: TypeLiteral @ org-dartlang-testcase:///various_2.dart:16:36 -> TypeLiteralConstant(T% Function(T%)) -Evaluated: ListLiteral @ org-dartlang-testcase:///various_2.dart:17:26 -> ListConstant(const [0]) -Evaluated: ListLiteral @ org-dartlang-testcase:///various_2.dart:18:31 -> ListConstant(const [const [42]]) -Evaluated: SetLiteral @ org-dartlang-testcase:///various_2.dart:21:25 -> SetConstant(const {0}) -Evaluated: SetLiteral @ org-dartlang-testcase:///various_2.dart:22:30 -> SetConstant(const {const [42]}) -Evaluated: MapLiteral @ org-dartlang-testcase:///various_2.dart:25:33 -> MapConstant(const {0: "foo"}) -Evaluated: MapLiteral @ org-dartlang-testcase:///various_2.dart:26:39 -> MapConstant(const {const [42]: "foo", null: const [42]}) -Evaluated: ListConcatenation @ org-dartlang-testcase:///various_2.dart:30:32 -> ListConstant(const [0]) -Evaluated: SetConcatenation @ org-dartlang-testcase:///various_2.dart:31:31 -> SetConstant(const {0}) -Evaluated: MapConcatenation @ org-dartlang-testcase:///various_2.dart:32:7 -> MapConstant(const {0: "foo"}) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:35:5 -> BoolConstant(true) -Evaluated with empty environment: StaticInvocation @ org-dartlang-testcase:///various_2.dart:37:5 -> BoolConstant(false) -Evaluated: StaticGet @ org-dartlang-testcase:///various_2.dart:37:15 -> InstantiationConstant(id1) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///various_2.dart:37:41 -> InstantiationConstant(id2) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:38:27 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:39:28 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:41:5 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:43:5 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:44:30 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:45:31 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:46:29 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:47:30 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:48:29 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:49:30 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:51:5 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:53:5 -> BoolConstant(true) -Evaluated: StaticInvocation @ org-dartlang-testcase:///various_2.dart:55:5 -> BoolConstant(true) -Evaluated: TypeLiteral @ org-dartlang-testcase:///various_2_lib.dart:17:27 -> TypeLiteralConstant(Object) -Evaluated: StaticTearOff @ org-dartlang-testcase:///various_2_lib.dart:18:12 -> StaticTearOffConstant(identical) -Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase:///various_2_lib.dart:20:39 -> InstantiationConstant(id2) -Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///various_2_lib.dart:20:11 -> BoolConstant(false) -Evaluated: Instantiation @ org-dartlang-testcase:///various_2_lib.dart:20:41 -> InstantiationConstant(id1) -Evaluated: Instantiation @ org-dartlang-testcase:///various_2_lib.dart:20:47 -> InstantiationConstant(id2) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various_2_lib.dart:21:24 -> InstanceConstant(const Class{Class.field: 0}) -Evaluated: ConstructorInvocation @ org-dartlang-testcase:///various_2_lib.dart:22:25 -> InstanceConstant(const Class{Class.field: const [42]}) -Evaluated: TypeLiteral @ org-dartlang-testcase:///various_2_lib.dart:23:29 -> TypeLiteralConstant(dynamic Function(dynamic)) -Evaluated: TypeLiteral @ org-dartlang-testcase:///various_2_lib.dart:24:36 -> TypeLiteralConstant(T% Function(T%)) -Evaluated: ListLiteral @ org-dartlang-testcase:///various_2_lib.dart:25:26 -> ListConstant(const [0]) -Evaluated: ListLiteral @ org-dartlang-testcase:///various_2_lib.dart:26:31 -> ListConstant(const [const [42]]) -Evaluated: SetLiteral @ org-dartlang-testcase:///various_2_lib.dart:29:25 -> SetConstant(const {0}) -Evaluated: SetLiteral @ org-dartlang-testcase:///various_2_lib.dart:30:30 -> SetConstant(const {const [42]}) -Evaluated: MapLiteral @ org-dartlang-testcase:///various_2_lib.dart:33:33 -> MapConstant(const {0: "foo"}) -Evaluated: MapLiteral @ org-dartlang-testcase:///various_2_lib.dart:34:39 -> MapConstant(const {const [42]: "foo", null: const [42]}) -Evaluated: ListConcatenation @ org-dartlang-testcase:///various_2_lib.dart:38:32 -> ListConstant(const [0]) -Evaluated: SetConcatenation @ org-dartlang-testcase:///various_2_lib.dart:39:31 -> SetConstant(const {0}) -Evaluated: MapConcatenation @ org-dartlang-testcase:///various_2_lib.dart:40:7 -> MapConstant(const {0: "foo"}) -Extra constant evaluation: evaluated: 52, effectively constant: 51 diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.transformed.expect deleted file mode 100644 index 28dd954aaf3b..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.strong.transformed.expect +++ /dev/null @@ -1,148 +0,0 @@ -library; -import self as self; -import "dart:core" as core; -import "various_2_lib.dart" as var; - -import "org-dartlang-testcase:///various_2_lib.dart" as lib; - -typedef F1 = (T%) → T%; -typedef F2 = (T%) → T%; -static const field core::Type objectTypeLiteral = #C1; -static const field (core::int) → core::int partialInstantiation = #C3; -static const field var::Class instance = #C5; -static const field var::Class instance2 = #C8; -static const field core::Type functionTypeLiteral = #C9; -static const field core::Type genericFunctionTypeLiteral = #C10; -static const field core::List listLiteral = #C11; -static const field core::List listLiteral2 = #C12; -static const field core::Set setLiteral = #C13; -static const field core::Set setLiteral2 = #C14; -static const field core::Map mapLiteral = #C16; -static const field core::Map mapLiteral2 = #C18; -static const field core::List listConcatenation = #C11; -static const field core::Set setConcatenation = #C13; -static const field core::Map mapConcatenation = #C16; -static const field core::bool objectTypeLiteralIdentical = #C19; -static const field core::bool partialInstantiationIdentical = #C25; -static const field core::bool instanceIdentical = #C19; -static const field core::bool instance2Identical = #C19; -static const field core::bool functionTypeLiteralIdentical = #C19; -static const field core::bool genericFunctionTypeLiteralIdentical = #C19; -static const field core::bool listLiteralIdentical = #C19; -static const field core::bool listLiteral2Identical = #C19; -static const field core::bool setLiteralIdentical = #C19; -static const field core::bool setLiteral2Identical = #C19; -static const field core::bool mapLiteralIdentical = #C19; -static const field core::bool mapLiteral2Identical = #C19; -static const field core::bool listConcatenationIdentical = #C19; -static const field core::bool setConcatenationIdentical = #C19; -static const field core::bool mapConcatenationIdentical = #C19; -static method main() → dynamic { - self::test(#C1, #C1); - self::test(#C3, #C24); - self::test(#C5, #C5); - self::test(#C9, #C9); - self::test(#C10, #C10); - self::test(#C11, #C11); - self::test(#C13, #C13); - self::test(#C16, #C16); - self::test(#C11, #C11); - self::test(#C13, #C13); - self::test(#C16, #C16); - self::test(true, #C19); - self::test(true, #C25); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); - self::test(true, #C19); -} -static method test(dynamic expected, dynamic actual) → dynamic { - core::print("test(${expected}, ${actual})"); - if(!core::identical(expected, actual)) { - throw "Expected ${expected}, actual ${actual}"; - } -} - -library; -import self as var; -import "dart:core" as core; - -typedef F1 = (T%) → T%; -typedef F2 = (T%) → T%; -class Class extends core::Object /*hasConstConstructor*/ { - final field var::Class::T% field; - const constructor •(var::Class::T% field) → var::Class - : var::Class::field = field, super core::Object::•() - ; -} -static const field core::Type objectTypeLiteral = #C1; -static const field (core::Object?, core::Object?) → core::bool c2 = #C26; -static const field (core::int) → core::int partialInstantiation = #C24; -static const field var::Class instance = #C5; -static const field var::Class instance2 = #C8; -static const field core::Type functionTypeLiteral = #C9; -static const field core::Type genericFunctionTypeLiteral = #C10; -static const field core::List listLiteral = #C11; -static const field core::List listLiteral2 = #C12; -static const field core::Set setLiteral = #C13; -static const field core::Set setLiteral2 = #C14; -static const field core::Map mapLiteral = #C16; -static const field core::Map mapLiteral2 = #C18; -static const field core::List listConcatenation = #C11; -static const field core::Set setConcatenation = #C13; -static const field core::Map mapConcatenation = #C16; -static method id1(var::id1::T% t) → var::id1::T% - return t; -static method id2(var::id2::T% t) → var::id2::T% - return t; - -constants { - #C1 = TypeLiteralConstant(core::Object) - #C2 = static-tearoff var::id1 - #C3 = instantiation #C2 - #C4 = 0 - #C5 = var::Class {field:#C4} - #C6 = 42 - #C7 = [#C6] - #C8 = var::Class {field:#C7} - #C9 = TypeLiteralConstant((dynamic) → dynamic) - #C10 = TypeLiteralConstant((T%) → T%) - #C11 = [#C4] - #C12 = [#C7] - #C13 = {#C4} - #C14 = {#C7} - #C15 = "foo" - #C16 = {#C4:#C15} - #C17 = null - #C18 = {#C7:#C15, #C17:#C7} - #C19 = true - #C20 = eval const core::bool::fromEnvironment(#C15) - #C21 = eval #C2 - #C22 = static-tearoff var::id2 - #C23 = eval #C22 - #C24 = eval #C20 ?{(core::int) → core::int} #C21 : #C23 - #C25 = eval core::identical(#C3, #C24) - #C26 = static-tearoff core::identical -} - -Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2.dart:59:34 -> InstantiationConstant(id2) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2.dart:71:14 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2.dart:37:5 -> BoolConstant(false) -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2_lib.dart:20:39 -> InstantiationConstant(id2) -Extra constant evaluation: evaluated: 41, effectively constant: 4 - - -Constructor coverage from constants: -org-dartlang-testcase:///various_2.dart: -- Class. (from org-dartlang-testcase:///various_2_lib.dart:8:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) - -org-dartlang-testcase:///various_2_lib.dart: -- Class. (from org-dartlang-testcase:///various_2_lib.dart:8:9) -- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.textual_outline.expect deleted file mode 100644 index 34744ae86512..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.textual_outline.expect +++ /dev/null @@ -1,83 +0,0 @@ -import 'various_2_lib.dart' as lib; - -typedef F1 = T Function(T); - -typedef F2 = T Function(T); - -const objectTypeLiteral = Object; - -const int Function(int) partialInstantiation = lib.id1; - -const instance = const lib.Class(0); - -const instance2 = const lib.Class([42]); - -const functionTypeLiteral = F1; - -const genericFunctionTypeLiteral = F2; - -const listLiteral = [0]; - -const listLiteral2 = [ - [42] -]; - -const setLiteral = {0}; - -const setLiteral2 = { - [42] -}; - -const mapLiteral = {0: 'foo'}; - -const mapLiteral2 = { - [42]: 'foo', - null: [42] -}; - -const listConcatenation = [...listLiteral]; - -const setConcatenation = {...setLiteral}; - -const mapConcatenation = {...mapLiteral}; - -const objectTypeLiteralIdentical = - identical(objectTypeLiteral, lib.objectTypeLiteral); - -const partialInstantiationIdentical = - identical(partialInstantiation, lib.partialInstantiation); - -const instanceIdentical = identical(instance, lib.instance); - -const instance2Identical = identical(instance2, lib.instance2); - -const functionTypeLiteralIdentical = - identical(functionTypeLiteral, lib.functionTypeLiteral); - -const genericFunctionTypeLiteralIdentical = - identical(genericFunctionTypeLiteral, lib.genericFunctionTypeLiteral); - -const listLiteralIdentical = identical(listLiteral, lib.listLiteral); - -const listLiteral2Identical = identical(listLiteral2, lib.listLiteral2); - -const setLiteralIdentical = identical(setLiteral, lib.setLiteral); - -const setLiteral2Identical = identical(setLiteral2, lib.setLiteral2); - -const mapLiteralIdentical = identical(mapLiteral, lib.mapLiteral); - -const mapLiteral2Identical = identical(mapLiteral2, lib.mapLiteral2); - -const listConcatenationIdentical = - identical(listConcatenation, lib.listConcatenation); - -const setConcatenationIdentical = - identical(setConcatenation, lib.setConcatenation); - -const mapConcatenationIdentical = - identical(mapConcatenation, lib.mapConcatenation); - -main() {} - -test(expected, actual) {} diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.textual_outline_modelled.expect deleted file mode 100644 index 526acbd137d7..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,83 +0,0 @@ -import 'various_2_lib.dart' as lib; - -const functionTypeLiteral = F1; - -const functionTypeLiteralIdentical = - identical(functionTypeLiteral, lib.functionTypeLiteral); - -const genericFunctionTypeLiteral = F2; - -const genericFunctionTypeLiteralIdentical = - identical(genericFunctionTypeLiteral, lib.genericFunctionTypeLiteral); - -const instance = const lib.Class(0); - -const instance2 = const lib.Class([42]); - -const instance2Identical = identical(instance2, lib.instance2); - -const instanceIdentical = identical(instance, lib.instance); - -const int Function(int) partialInstantiation = lib.id1; - -const listConcatenation = [...listLiteral]; - -const listConcatenationIdentical = - identical(listConcatenation, lib.listConcatenation); - -const listLiteral = [0]; - -const listLiteral2 = [ - [42] -]; - -const listLiteral2Identical = identical(listLiteral2, lib.listLiteral2); - -const listLiteralIdentical = identical(listLiteral, lib.listLiteral); - -const mapConcatenation = {...mapLiteral}; - -const mapConcatenationIdentical = - identical(mapConcatenation, lib.mapConcatenation); - -const mapLiteral = {0: 'foo'}; - -const mapLiteral2 = { - [42]: 'foo', - null: [42] -}; - -const mapLiteral2Identical = identical(mapLiteral2, lib.mapLiteral2); - -const mapLiteralIdentical = identical(mapLiteral, lib.mapLiteral); - -const objectTypeLiteral = Object; - -const objectTypeLiteralIdentical = - identical(objectTypeLiteral, lib.objectTypeLiteral); - -const partialInstantiationIdentical = - identical(partialInstantiation, lib.partialInstantiation); - -const setConcatenation = {...setLiteral}; - -const setConcatenationIdentical = - identical(setConcatenation, lib.setConcatenation); - -const setLiteral = {0}; - -const setLiteral2 = { - [42] -}; - -const setLiteral2Identical = identical(setLiteral2, lib.setLiteral2); - -const setLiteralIdentical = identical(setLiteral, lib.setLiteral); - -main() {} - -test(expected, actual) {} - -typedef F1 = T Function(T); - -typedef F2 = T Function(T); diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2_lib.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2_lib.dart deleted file mode 100644 index 7a06e11371ab..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2_lib.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -class Class { - final T field; - - const Class(this.field); -} - -T id1(T t) => t; -T id2(T t) => t; - -typedef F1 = T Function(T); -typedef F2 = T Function(T); - -const objectTypeLiteral = Object; -const c2 = identical; -const int Function(int) partialInstantiation = - const bool.fromEnvironment("foo") ? id1 : id2; -const instance = const Class(0); -const instance2 = const Class([42]); -const functionTypeLiteral = F1; -const genericFunctionTypeLiteral = F2; -const listLiteral = [0]; -const listLiteral2 = [ - [42] -]; -const setLiteral = {0}; -const setLiteral2 = { - [42] -}; -const mapLiteral = {0: 'foo'}; -const mapLiteral2 = { - [42]: 'foo', - null: [42] -}; -const listConcatenation = [...listLiteral]; -const setConcatenation = {...setLiteral}; -const mapConcatenation = {...mapLiteral}; diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_lib.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_lib.dart deleted file mode 100644 index 06d2cb3bd773..000000000000 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_lib.dart +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const x = 42; diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart deleted file mode 100644 index bf2442b60b5d..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'from_agnostic_lib.dart'; - -const c1 = identical(a, b); -const c2 = {a: 0, b: 1}; -const c3 = {a, b}; -const c4 = a; -const c5 = b; - -main() { - a; - b; -} diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect deleted file mode 100644 index aad533b711b8..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect +++ /dev/null @@ -1,32 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -import "org-dartlang-testcase:///from_agnostic_lib.dart"; - -static const field core::bool c1 = #C1; -static const field core::Map, core::int> c2 = #C6; -static const field core::Set> c3 = #C7; -static const field core::List c4 = #C2; -static const field core::List c5 = #C4; -static method main() → dynamic { - #C2; - #C4; -} - -library; -import self as self2; -import "dart:core" as core; - -static const field core::List a = #C2; -static const field core::List b = #C4; - -constants { - #C1 = false - #C2 = [] - #C3 = 0 - #C4 = [] - #C5 = 1 - #C6 = , core::int>{#C2:#C3, #C4:#C5} - #C7 = >{#C2, #C4} -} diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.modular.expect deleted file mode 100644 index b490f07af99b..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.modular.expect +++ /dev/null @@ -1,25 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -import "org-dartlang-testcase:///from_agnostic_lib.dart"; - -static const field core::bool c1 = #C1; -static const field core::Map, core::int> c2 = #C6; -static const field core::Set> c3 = #C7; -static const field core::List c4 = #C2; -static const field core::List c5 = #C4; -static method main() → dynamic { - #C2; - #C4; -} - -constants { - #C1 = false - #C2 = [] - #C3 = 0 - #C4 = [] - #C5 = 1 - #C6 = , core::int>{#C2:#C3, #C4:#C5} - #C7 = >{#C2, #C4} -} diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.outline.expect deleted file mode 100644 index f630322f642d..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.outline.expect +++ /dev/null @@ -1,34 +0,0 @@ -library; -import self as self; -import "dart:core" as core; -import "from_agnostic_lib.dart" as fro; - -import "org-dartlang-testcase:///from_agnostic_lib.dart"; - -static const field core::bool c1 = core::identical(fro::a, fro::b); -static const field core::Map, core::int> c2 = const , core::int>{fro::a: 0, fro::b: 1}; -static const field core::Set> c3 = const >{fro::a, fro::b}; -static const field core::List c4 = fro::a; -static const field core::List c5 = fro::b; -static method main() → dynamic - ; - -library; -import self as fro; -import "dart:core" as core; - -static const field core::List a = #C1; -static const field core::List b = #C2; - -constants { - #C1 = [] - #C2 = [] -} - -Extra constant evaluation status: -Evaluated: StaticInvocation @ org-dartlang-testcase:///from_agnostic.dart:7:12 -> BoolConstant(false) -Evaluated: MapLiteral @ org-dartlang-testcase:///from_agnostic.dart:8:12 -> MapConstant(const , int>{const []: 0, const []: 1}) -Evaluated: SetLiteral @ org-dartlang-testcase:///from_agnostic.dart:9:12 -> SetConstant(const >{const [], const []}) -Evaluated: StaticGet @ org-dartlang-testcase:///from_agnostic.dart:10:12 -> ListConstant(const []) -Evaluated: StaticGet @ org-dartlang-testcase:///from_agnostic.dart:11:12 -> ListConstant(const []) -Extra constant evaluation: evaluated: 5, effectively constant: 5 diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect deleted file mode 100644 index aad533b711b8..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect +++ /dev/null @@ -1,32 +0,0 @@ -library; -import self as self; -import "dart:core" as core; - -import "org-dartlang-testcase:///from_agnostic_lib.dart"; - -static const field core::bool c1 = #C1; -static const field core::Map, core::int> c2 = #C6; -static const field core::Set> c3 = #C7; -static const field core::List c4 = #C2; -static const field core::List c5 = #C4; -static method main() → dynamic { - #C2; - #C4; -} - -library; -import self as self2; -import "dart:core" as core; - -static const field core::List a = #C2; -static const field core::List b = #C4; - -constants { - #C1 = false - #C2 = [] - #C3 = 0 - #C4 = [] - #C5 = 1 - #C6 = , core::int>{#C2:#C3, #C4:#C5} - #C7 = >{#C2, #C4} -} diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.textual_outline.expect deleted file mode 100644 index 95d8d5332a02..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.textual_outline.expect +++ /dev/null @@ -1,13 +0,0 @@ -import 'from_agnostic_lib.dart'; - -const c1 = identical(a, b); - -const c2 = {a: 0, b: 1}; - -const c3 = {a, b}; - -const c4 = a; - -const c5 = b; - -main() {} diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.textual_outline_modelled.expect deleted file mode 100644 index 95d8d5332a02..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.textual_outline_modelled.expect +++ /dev/null @@ -1,13 +0,0 @@ -import 'from_agnostic_lib.dart'; - -const c1 = identical(a, b); - -const c2 = {a: 0, b: 1}; - -const c3 = {a, b}; - -const c4 = a; - -const c5 = b; - -main() {} diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart deleted file mode 100644 index 6427cd2334e0..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -const a = []; -const b = []; diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/test.options b/pkg/front_end/testcases/nnbd/from_agnostic/test.options deleted file mode 100644 index 88923b684210..000000000000 --- a/pkg/front_end/testcases/nnbd/from_agnostic/test.options +++ /dev/null @@ -1,2 +0,0 @@ ---nnbd-agnostic -from_agnostic_lib.dart \ No newline at end of file diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn index 6e32189fa097..fcbb1aa6f06f 100644 --- a/runtime/vm/BUILD.gn +++ b/runtime/vm/BUILD.gn @@ -258,7 +258,7 @@ template("gen_vm_platform") { args += [ "-Ddart.vm.product=$is_product_flag", "-Ddart.isVM=true", - "--nnbd-agnostic", + "--nnbd-strong", ] if (defined(invoker.exclude_source) && invoker.exclude_source) { args += [ "--exclude-source" ]