diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart index 39a047b1a68..4d74472a07b 100644 --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart @@ -3982,13 +3982,8 @@ class BodyBuilder extends StackListenerImpl ]), count))); - if (!libraryFeatures.records.isEnabled) { - addProblem( - templateExperimentNotEnabledOffByDefault - .withArguments(ExperimentalFlag.records.name), - token.offset, - noLength); - } + reportIfNotEnabled( + libraryFeatures.records, token.charOffset, token.charCount); // Pop all elements. This will put them in evaluation order. List? elements = diff --git a/pkg/front_end/testcases/general/records_opt_out.dart.weak.expect b/pkg/front_end/testcases/general/records_opt_out.dart.weak.expect index 2f8545c29fd..1a0fef07f66 100644 --- a/pkg/front_end/testcases/general/records_opt_out.dart.weak.expect +++ b/pkg/front_end/testcases/general/records_opt_out.dart.weak.expect @@ -32,35 +32,53 @@ library /*isNonNullableByDefault*/; // String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b; // ^ // -// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (int, String) method1(int a, String b) => (a, b); // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // int method2([(int, String) record = const (0, '')]) => record.$0; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // String method3([(int, String) record = const (0, '')]) => record.$1; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // ({int a, String b}) method4(int a, String b) => (a: a, b: b); // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // int method5([({int a, String b}) record = const (a: 0, b: '')]) => record.a; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/records_opt_out.dart.weak.modular.expect b/pkg/front_end/testcases/general/records_opt_out.dart.weak.modular.expect index 2f8545c29fd..1a0fef07f66 100644 --- a/pkg/front_end/testcases/general/records_opt_out.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/records_opt_out.dart.weak.modular.expect @@ -32,35 +32,53 @@ library /*isNonNullableByDefault*/; // String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b; // ^ // -// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (int, String) method1(int a, String b) => (a, b); // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // int method2([(int, String) record = const (0, '')]) => record.$0; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // String method3([(int, String) record = const (0, '')]) => record.$1; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // ({int a, String b}) method4(int a, String b) => (a: a, b: b); // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // int method5([({int a, String b}) record = const (a: 0, b: '')]) => record.a; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/records_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/general/records_opt_out.dart.weak.transformed.expect index 2f8545c29fd..1a0fef07f66 100644 --- a/pkg/front_end/testcases/general/records_opt_out.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/records_opt_out.dart.weak.transformed.expect @@ -32,35 +32,53 @@ library /*isNonNullableByDefault*/; // String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b; // ^ // -// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:7:43: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (int, String) method1(int a, String b) => (a, b); // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:8:43: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // int method2([(int, String) record = const (0, '')]) => record.$0; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:9:46: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // String method3([(int, String) record = const (0, '')]) => record.$1; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:10:49: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // ({int a, String b}) method4(int a, String b) => (a: a, b: b); // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:11:49: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // int method5([({int a, String b}) record = const (a: 0, b: '')]) => record.a; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/general/records_opt_out.dart:12:52: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // String method6([({int a, String b}) record = const (a: 0, b: '')]) => record.b; // ^ +// pkg/front_end/testcases/general/records_opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.18 +// ^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.expect index a5f34cd1ba2..4c3f1567f90 100644 --- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.expect +++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.expect @@ -6,85 +6,133 @@ library; // // @dart=2.9 // ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (int, String); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, c: 2, d: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, d: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, d: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (d: 0, a: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, 2, a: 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, c: 4, 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, a: 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: this, 0); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.transformed.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.transformed.expect index a5f34cd1ba2..4c3f1567f90 100644 --- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.strong.transformed.expect @@ -6,85 +6,133 @@ library; // // @dart=2.9 // ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (int, String); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, c: 2, d: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, d: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, d: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (d: 0, a: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, 2, a: 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, c: 4, 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, a: 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: this, 0); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.expect index 6a9ad1f053b..3e646fb9ef4 100644 --- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.expect +++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.expect @@ -2,85 +2,133 @@ library; // // Problems in library: // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (int, String); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, c: 2, d: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, d: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, d: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (d: 0, a: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, 2, a: 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, c: 4, 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, a: 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: this, 0); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.modular.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.modular.expect index 6a9ad1f053b..3e646fb9ef4 100644 --- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.modular.expect +++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.modular.expect @@ -2,85 +2,133 @@ library; // // Problems in library: // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (int, String); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, c: 2, d: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, d: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, d: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (d: 0, a: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, 2, a: 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, c: 4, 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, a: 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: this, 0); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.transformed.expect b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.transformed.expect index 6a9ad1f053b..3e646fb9ef4 100644 --- a/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/records/record_literal_unsupported.dart.weak.transformed.expect @@ -2,85 +2,133 @@ library; // // Problems in library: // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:8:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:9:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:10:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:11:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:12:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (int, String); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:16:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, c: 2, d: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:17:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, b: 1, d: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:18:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, d: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:19:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (d: 0, a: 1, b: 2, c: 3); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:20:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, 2, a: 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:21:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:22:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:23:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, 1, a: 2, b: 3, c: 4, 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:24:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (0, a: 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:25:3: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: 0, 1, 2, 3, b: 4, c: 5); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // -// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: This requires the experimental 'records' language feature to be enabled. -// Try passing the '--enable-experiment=records' command line option. +// pkg/front_end/testcases/records/record_literal_unsupported.dart:30:5: Error: The 'records' language feature is disabled for this library. +// Try removing the `@dart=` annotation or setting the language version to 2.19 or higher. // (a: this, 0); // ^ +// pkg/front_end/testcases/records/record_literal_unsupported.dart:5:1: Context: This is the annotation that opts out this library from the 'records' language feature. +// // @dart=2.9 +// ^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/tests/language_2/record_literal_problems_test.dart b/tests/language_2/record_literal_problems_test.dart index 66da8f220c6..f089d7cca81 100644 --- a/tests/language_2/record_literal_problems_test.dart +++ b/tests/language_2/record_literal_problems_test.dart @@ -10,7 +10,7 @@ main() { var r1 = const (42); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. // ^ // [analyzer] SYNTACTIC_ERROR.RECORD_LITERAL_ONE_POSITIONAL_NO_TRAILING_COMMA // [cfe] Record literal with one field requires a trailing comma. @@ -18,7 +18,7 @@ main() { var r2 = const (); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. // ^ // [analyzer] SYNTACTIC_ERROR.RECORD_LITERAL_EMPTY // [cfe] Record literal can't be empty. diff --git a/tests/language_2/record_literal_test.dart b/tests/language_2/record_literal_test.dart index 4441b55cd1e..f97d8dabb51 100644 --- a/tests/language_2/record_literal_test.dart +++ b/tests/language_2/record_literal_test.dart @@ -10,54 +10,54 @@ main() { var record1 = (1, 2, a: 3, b: 4); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. print(record1); // With ending comma. var record2 = (42, 42, 42, ); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. print(record2); var record3 = (foo: 42, bar: 42, 42, baz: 42, ); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. print(record3); // Nested. var record4 = ((42, 42), 42); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. print(record4); // With function inside. var record5 = ((foo, bar) => 42, 42); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. print(record5); // 1 record entry with trailing comma. var record6 = (42, ); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. print(record6); // Const records. var record7 = const (42, ); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. print(record7); var record8 = const (42, foo: "bar"); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. print(record8); } diff --git a/tests/language_2/record_type_problems_test.dart b/tests/language_2/record_type_problems_test.dart index 70d081fd41b..d67e4db9b15 100644 --- a/tests/language_2/record_type_problems_test.dart +++ b/tests/language_2/record_type_problems_test.dart @@ -16,7 +16,7 @@ main() { // [cfe] Record type named fields list can't be empty. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. (int /* missing trailing comma */ ) r2 = (1, ); //^ @@ -27,14 +27,14 @@ main() { // [cfe] Record type with one entry requires a trailing comma. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. () emptyRecord = Record.empty; //^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED // [cfe] This requires the experimental 'records' language feature to be enabled. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] Undefined name 'Record'. +// ^^^^^^ +// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER +// [cfe] Undefined name 'Record'. print(emptyRecord); } diff --git a/tests/language_2/record_type_test.dart b/tests/language_2/record_type_test.dart index e60f48fb31f..edf5293076d 100644 --- a/tests/language_2/record_type_test.dart +++ b/tests/language_2/record_type_test.dart @@ -13,7 +13,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(record1); (int x, int y) record1Named = (1, 2); //^ @@ -21,7 +21,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(record1Named); (int, int, ) record2 = (1, 2); @@ -30,7 +30,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(record2); (int x, int y, ) record2Named = (1, 2); @@ -39,7 +39,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(record2Named); (int, int, {int a, int b}) record3 = (1, 2, a: 3, b: 4); @@ -48,7 +48,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(record3); (int x, int y, {int a, int b}) record3Named = (1, 2, a: 3, b: 4); @@ -57,7 +57,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(record3Named); (int, int, {int a, int b, }) record4 = (1, 2, a: 3, b: 4); @@ -66,7 +66,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(record4); (int x, int y, {int a, int b, }) record4Named = (1, 2, a: 3, b: 4); @@ -75,13 +75,13 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(record4Named); print(foo((42, b: true), 42)); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. Bar b = new Bar(); print(b.foo(42)); @@ -97,7 +97,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. final (int x, int y) finalRecordType = (42, 42); // ^ @@ -105,7 +105,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. List<(int, int)> listOfRecords = []; // ^ @@ -123,7 +123,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(oneElementRecord); ({int ok}) oneElementNamedRecord = (ok: 1); @@ -132,7 +132,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. print(oneElementNamedRecord); } @@ -143,7 +143,7 @@ main() { return (42, t); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. } (int, T) f2(T t) => (42, t); @@ -152,7 +152,7 @@ main() { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. (int a, String b) get topLevelGetterType => throw ''; // [error column 1, length 1] @@ -169,11 +169,11 @@ main() { if (inputRecord.b) return (42, 42); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. return (1, 1, ); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. } class Bar { @@ -183,7 +183,7 @@ class Bar { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. static (int x, int y) staticRecordType = (42, 42); // ^ @@ -191,7 +191,7 @@ class Bar { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. (int a, String b) get instanceGetterType => throw ''; //^ @@ -210,7 +210,7 @@ class Bar { return (42, t); // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] This requires the experimental 'records' language feature to be enabled. + // [cfe] The 'records' language feature is disabled for this library. } (int, T) f2(T t) => (42, t); @@ -219,6 +219,6 @@ class Bar { // [cfe] This requires the experimental 'records' language feature to be enabled. // ^ // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] This requires the experimental 'records' language feature to be enabled. +// [cfe] The 'records' language feature is disabled for this library. }