diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart index 9e622a74250..27c7434efc5 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart @@ -11273,59 +11273,151 @@ const MessageCode messageLanguageVersionPatchContext = const MessageCode( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateLanguageVersionTooHigh = - const Template( - "LanguageVersionTooHigh", +const Template + templateLanguageVersionTooHighExplicit = const Template< + Message Function(int count, int count2, int count3, int count4)>( + "LanguageVersionTooHighExplicit", problemMessageTemplate: - r"""The specified language version is too high. The highest supported language version is #count.#count2.""", - withArguments: _withArgumentsLanguageVersionTooHigh, + r"""The specified language version #count.#count2 is too high. The highest supported language version is #count3.#count4.""", + withArguments: _withArgumentsLanguageVersionTooHighExplicit, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeLanguageVersionTooHigh = - const Code( - "LanguageVersionTooHigh", +const Code + codeLanguageVersionTooHighExplicit = + const Code( + "LanguageVersionTooHighExplicit", ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsLanguageVersionTooHigh(int count, int count2) { +Message _withArgumentsLanguageVersionTooHighExplicit( + int count, int count2, int count3, int count4) { return new Message( - codeLanguageVersionTooHigh, + codeLanguageVersionTooHighExplicit, problemMessage: - """The specified language version is too high. The highest supported language version is ${count}.${count2}.""", + """The specified language version ${count}.${count2} is too high. The highest supported language version is ${count3}.${count4}.""", arguments: { 'count': count, 'count2': count2, + 'count3': count3, + 'count4': count4, }, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateLanguageVersionTooLow = - const Template( - "LanguageVersionTooLow", +const Template< + Message Function( + int count, int count2, String name, int count3, int count4)> + templateLanguageVersionTooHighPackage = const Template< + Message Function( + int count, int count2, String name, int count3, int count4)>( + "LanguageVersionTooHighPackage", problemMessageTemplate: - r"""The specified language version is too low. The lowest supported language version is #count.#count2.""", - withArguments: _withArgumentsLanguageVersionTooLow, + r"""The language version #count.#count2 specified for the package '#name' is too high. The highest supported language version is #count3.#count4.""", + withArguments: _withArgumentsLanguageVersionTooHighPackage, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeLanguageVersionTooLow = - const Code( - "LanguageVersionTooLow", +const Code< + Message Function( + int count, int count2, String name, int count3, int count4)> + codeLanguageVersionTooHighPackage = const Code< + Message Function( + int count, int count2, String name, int count3, int count4)>( + "LanguageVersionTooHighPackage", ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsLanguageVersionTooLow(int count, int count2) { +Message _withArgumentsLanguageVersionTooHighPackage( + int count, int count2, String name, int count3, int count4) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); return new Message( - codeLanguageVersionTooLow, + codeLanguageVersionTooHighPackage, problemMessage: - """The specified language version is too low. The lowest supported language version is ${count}.${count2}.""", + """The language version ${count}.${count2} specified for the package '${name}' is too high. The highest supported language version is ${count3}.${count4}.""", arguments: { 'count': count, 'count2': count2, + 'name': name, + 'count3': count3, + 'count4': count4, + }, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template + templateLanguageVersionTooLowExplicit = const Template< + Message Function(int count, int count2, int count3, int count4)>( + "LanguageVersionTooLowExplicit", + problemMessageTemplate: + r"""The specified language version #count.#count2 is too low. The lowest supported language version is #count3.#count4.""", + withArguments: _withArgumentsLanguageVersionTooLowExplicit, +); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code + codeLanguageVersionTooLowExplicit = + const Code( + "LanguageVersionTooLowExplicit", +); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsLanguageVersionTooLowExplicit( + int count, int count2, int count3, int count4) { + return new Message( + codeLanguageVersionTooLowExplicit, + problemMessage: + """The specified language version ${count}.${count2} is too low. The lowest supported language version is ${count3}.${count4}.""", + arguments: { + 'count': count, + 'count2': count2, + 'count3': count3, + 'count4': count4, + }, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template< + Message Function( + int count, int count2, String name, int count3, int count4)> + templateLanguageVersionTooLowPackage = const Template< + Message Function( + int count, int count2, String name, int count3, int count4)>( + "LanguageVersionTooLowPackage", + problemMessageTemplate: + r"""The language version #count.#count2 specified for the package '#name' is too low. The lowest supported language version is #count3.#count4.""", + withArguments: _withArgumentsLanguageVersionTooLowPackage, +); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code< + Message Function( + int count, int count2, String name, int count3, int count4)> + codeLanguageVersionTooLowPackage = const Code< + Message Function( + int count, int count2, String name, int count3, int count4)>( + "LanguageVersionTooLowPackage", +); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsLanguageVersionTooLowPackage( + int count, int count2, String name, int count3, int count4) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeLanguageVersionTooLowPackage, + problemMessage: + """The language version ${count}.${count2} specified for the package '${name}' is too low. The lowest supported language version is ${count3}.${count4}.""", + arguments: { + 'count': count, + 'count2': count2, + 'name': name, + 'count3': count3, + 'count4': count4, }, ); } diff --git a/pkg/front_end/lib/src/source/source_compilation_unit.dart b/pkg/front_end/lib/src/source/source_compilation_unit.dart index 0bf10f2a7ed..3a2ea4b846f 100644 --- a/pkg/front_end/lib/src/source/source_compilation_unit.dart +++ b/pkg/front_end/lib/src/source/source_compilation_unit.dart @@ -351,7 +351,9 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit { // If trying to set a language version that is higher than the current sdk // version it's an error. addPostponedProblem( - templateLanguageVersionTooHigh.withArguments( + templateLanguageVersionTooHighExplicit.withArguments( + version.major, + version.minor, loader.target.currentSdkVersion.major, loader.target.currentSdkVersion.minor), offset, @@ -363,7 +365,9 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit { fileUri, offset, length, packageLanguageVersion.version, true); } else if (version < loader.target.leastSupportedVersion) { addPostponedProblem( - templateLanguageVersionTooLow.withArguments( + templateLanguageVersionTooLowExplicit.withArguments( + version.major, + version.minor, loader.target.leastSupportedVersion.major, loader.target.leastSupportedVersion.minor), offset, diff --git a/pkg/front_end/lib/src/source/source_loader.dart b/pkg/front_end/lib/src/source/source_loader.dart index 0d339cd9db9..54184734b7c 100644 --- a/pkg/front_end/lib/src/source/source_loader.dart +++ b/pkg/front_end/lib/src/source/source_loader.dart @@ -550,14 +550,20 @@ class SourceLoader extends Loader { if (version > target.currentSdkVersion) { // Coverage-ignore-block(suite): Not run. packageLanguageVersionProblem = - templateLanguageVersionTooHigh.withArguments( + templateLanguageVersionTooHighPackage.withArguments( + version.major, + version.minor, + packageForLanguageVersion.name, target.currentSdkVersion.major, target.currentSdkVersion.minor); packageLanguageVersion = new InvalidLanguageVersion( fileUri, 0, noLength, target.currentSdkVersion, false); } else if (version < target.leastSupportedVersion) { packageLanguageVersionProblem = - templateLanguageVersionTooLow.withArguments( + templateLanguageVersionTooLowPackage.withArguments( + version.major, + version.minor, + packageForLanguageVersion.name, target.leastSupportedVersion.major, target.leastSupportedVersion.minor); packageLanguageVersion = new InvalidLanguageVersion( diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status index 255458117f1..521e2ed42e4 100644 --- a/pkg/front_end/messages.status +++ b/pkg/front_end/messages.status @@ -708,10 +708,14 @@ LanguageVersionMismatchInPart/analyzerCode: Fail LanguageVersionMismatchInPart/part_wrapped_script: Fail # Part in (now) part. LanguageVersionMismatchInPatch/analyzerCode: Fail LanguageVersionMismatchInPatch/example: Fail -LanguageVersionTooHigh/analyzerCode: Fail -LanguageVersionTooHigh/part_wrapped_script: Fail # Content comes after "part of [...]" meaning it's not actually a language version specification. -LanguageVersionTooLow/analyzerCode: Fail -LanguageVersionTooLow/part_wrapped_script: Fail # Content comes after "part of [...]" meaning it's not actually a language version specification. +LanguageVersionTooHighExplicit/analyzerCode: Fail +LanguageVersionTooHighExplicit/part_wrapped_script: Fail # Content comes after "part of [...]" meaning it's not actually a language version specification. +LanguageVersionTooHighPackage/analyzerCode: Fail +LanguageVersionTooHighPackage/example: Fail +LanguageVersionTooLowExplicit/analyzerCode: Fail +LanguageVersionTooLowExplicit/part_wrapped_script: Fail # Content comes after "part of [...]" meaning it's not actually a language version specification. +LanguageVersionTooLowPackage/analyzerCode: Fail +LanguageVersionTooLowPackage/example: Fail LateDefinitelyAssignedError/analyzerCode: Fail LateDefinitelyUnassignedError/analyzerCode: Fail LibraryDirectiveNotFirst/part_wrapped_script1: Fail # Defining library name in the (now) part. diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index 58373111bbc..f0773c0d92d 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -5369,16 +5369,22 @@ ExtensionTypeCombinedMemberSignatureFailed: } extension type C(I3 i) implements I2, I1 {} -LanguageVersionTooHigh: - problemMessage: "The specified language version is too high. The highest supported language version is #count.#count2." +LanguageVersionTooHighExplicit: + problemMessage: "The specified language version #count.#count2 is too high. The highest supported language version is #count3.#count4." script: > // @dart = 100.200 -LanguageVersionTooLow: - problemMessage: "The specified language version is too low. The lowest supported language version is #count.#count2." +LanguageVersionTooHighPackage: + problemMessage: "The language version #count.#count2 specified for the package '#name' is too high. The highest supported language version is #count3.#count4." + +LanguageVersionTooLowExplicit: + problemMessage: "The specified language version #count.#count2 is too low. The lowest supported language version is #count3.#count4." script: > // @dart = 2.9 +LanguageVersionTooLowPackage: + problemMessage: "The language version #count.#count2 specified for the package '#name' is too low. The lowest supported language version is #count3.#count4." + LanguageVersionInvalidInDotPackages: problemMessage: "The language version is not specified correctly in the packages file." exampleAllowMoreCodes: true diff --git a/pkg/front_end/test/language_versioning/data/library_with_bad_version.dart b/pkg/front_end/test/language_versioning/data/library_with_bad_version.dart index 36bf1ee2227..591bb268857 100644 --- a/pkg/front_end/test/language_versioning/data/library_with_bad_version.dart +++ b/pkg/front_end/test/language_versioning/data/library_with_bad_version.dart @@ -2,7 +2,7 @@ // 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. -/*error: errors=LanguageVersionTooHigh*/ +/*error: errors=LanguageVersionTooHighExplicit*/ // @dart = %TOO_HIGH_VERSION_MARKER% // If no valid language version is specified, we default to the most recent one. diff --git a/pkg/front_end/test/language_versioning/data/library_with_bad_version_before_good_version.dart b/pkg/front_end/test/language_versioning/data/library_with_bad_version_before_good_version.dart index 49f9a580fd6..0d81b2b6e28 100644 --- a/pkg/front_end/test/language_versioning/data/library_with_bad_version_before_good_version.dart +++ b/pkg/front_end/test/language_versioning/data/library_with_bad_version_before_good_version.dart @@ -2,7 +2,7 @@ // 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. -/*error: errors=LanguageVersionTooHigh*/ +/*error: errors=LanguageVersionTooHighExplicit*/ // @dart = %TOO_HIGH_VERSION_MARKER% // @dart = %VERSION_MARKER1% diff --git a/pkg/front_end/test/language_versioning/data/package_default_version/lib/foo4.dart b/pkg/front_end/test/language_versioning/data/package_default_version/lib/foo4.dart index 5303c3bd7bc..9f55c42727d 100644 --- a/pkg/front_end/test/language_versioning/data/package_default_version/lib/foo4.dart +++ b/pkg/front_end/test/language_versioning/data/package_default_version/lib/foo4.dart @@ -7,7 +7,7 @@ // range of the sdk. The library stays on the .dart_tool/package_config.json // specified one (%VERSION_MARKER1%) and an error is issued. -/*error: errors=LanguageVersionTooHigh*/ +/*error: errors=LanguageVersionTooHighExplicit*/ // @dart = %TOO_HIGH_VERSION_MARKER% /*library: languageVersion=%VERSION_MARKER1%*/ diff --git a/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo.dart b/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo.dart index da4baafe82c..0e3947ad57f 100644 --- a/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo.dart +++ b/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo.dart @@ -1,4 +1,4 @@ -/*error: errors=LanguageVersionTooHigh*/ +/*error: errors=LanguageVersionTooHighPackage*/ // Copyright (c) 2019, 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. diff --git a/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo2.dart b/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo2.dart index dd810fc16a9..d4e57c5b647 100644 --- a/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo2.dart +++ b/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo2.dart @@ -1,9 +1,9 @@ -/*error: errors=LanguageVersionTooHigh*/ +/*error: errors=LanguageVersionTooHighPackage*/ // Copyright (c) 2019, 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. -/*error: errors=LanguageVersionTooHigh*/ +/*error: errors=LanguageVersionTooHighExplicit*/ // @dart = %TOO_HIGH_VERSION_MARKER% /*library: languageVersion=%CURRENT_VERSION_MARKER%*/ diff --git a/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo3.dart b/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo3.dart index 79cfc8a73d0..da1f0e5689d 100644 --- a/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo3.dart +++ b/pkg/front_end/test/language_versioning/data/package_to_high_default_version/lib/foo3.dart @@ -1,4 +1,4 @@ -/*error: errors=LanguageVersionTooHigh*/ +/*error: errors=LanguageVersionTooHighPackage*/ // Copyright (c) 2019, 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. diff --git a/pkg/front_end/test/spell_checking_list_messages.txt b/pkg/front_end/test/spell_checking_list_messages.txt index 0a0382933d3..fe0e17a9d03 100644 --- a/pkg/front_end/test/spell_checking_list_messages.txt +++ b/pkg/front_end/test/spell_checking_list_messages.txt @@ -10,6 +10,7 @@ # automatic tools might move it to the top of the file. JS +RecordUse abispecificinteger abispecificintegermapping adjusting @@ -35,6 +36,7 @@ conformance constructor(s) core count.#count +count3.#count createstaticinteropmock d dart.dev @@ -120,7 +122,6 @@ preexisting pubspec.yaml r re -RecordUse refutable resource sdksummary diff --git a/pkg/front_end/testcases/general/least_supported_version.dart.strong.expect b/pkg/front_end/testcases/general/least_supported_version.dart.strong.expect index 77ba0540c40..11468f20374 100644 --- a/pkg/front_end/testcases/general/least_supported_version.dart.strong.expect +++ b/pkg/front_end/testcases/general/least_supported_version.dart.strong.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart=2.11 // ^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/general/least_supported_version.dart.strong.modular.expect b/pkg/front_end/testcases/general/least_supported_version.dart.strong.modular.expect index 77ba0540c40..11468f20374 100644 --- a/pkg/front_end/testcases/general/least_supported_version.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/least_supported_version.dart.strong.modular.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart=2.11 // ^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/general/least_supported_version.dart.strong.outline.expect b/pkg/front_end/testcases/general/least_supported_version.dart.strong.outline.expect index 6b6ddd5f3e9..07a37ef7b85 100644 --- a/pkg/front_end/testcases/general/least_supported_version.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/least_supported_version.dart.strong.outline.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart=2.11 // ^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/general/least_supported_version.dart.strong.transformed.expect b/pkg/front_end/testcases/general/least_supported_version.dart.strong.transformed.expect index 77ba0540c40..11468f20374 100644 --- a/pkg/front_end/testcases/general/least_supported_version.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/least_supported_version.dart.strong.transformed.expect @@ -2,7 +2,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart=2.11 // ^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.expect b/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.expect index e832ea07e6e..c0831091e56 100644 --- a/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.expect +++ b/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.expect @@ -1,7 +1,7 @@ // // Problems outside component: // -// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file // ^ // diff --git a/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.modular.expect b/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.modular.expect index e832ea07e6e..c0831091e56 100644 --- a/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.modular.expect @@ -1,7 +1,7 @@ // // Problems outside component: // -// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file // ^ // diff --git a/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.outline.expect b/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.outline.expect index e832ea07e6e..c0831091e56 100644 --- a/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/least_supported_version/main.dart.strong.outline.expect @@ -1,7 +1,7 @@ // // Problems outside component: // -// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file // ^ // diff --git a/pkg/front_end/testcases/general/too_high_version/.dart_tool/package_config.json b/pkg/front_end/testcases/general/too_high_version/.dart_tool/package_config.json new file mode 100644 index 00000000000..8798fde9800 --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/.dart_tool/package_config.json @@ -0,0 +1,12 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "too_high", + "rootUri": "../too_high/", + "packageUri": "lib/", + "languageVersion": "100.200" + } + + ] +} \ No newline at end of file diff --git a/pkg/front_end/testcases/general/too_high_version/main.dart b/pkg/front_end/testcases/general/too_high_version/main.dart new file mode 100644 index 00000000000..023d5eff35d --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/main.dart @@ -0,0 +1,5 @@ +// Copyright (c) 2024, 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 'package:too_high/too_high_lib.dart'; diff --git a/pkg/front_end/testcases/general/too_high_version/main.dart.strong.expect b/pkg/front_end/testcases/general/too_high_version/main.dart.strong.expect new file mode 100644 index 00000000000..8499a621dcf --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/main.dart.strong.expect @@ -0,0 +1,11 @@ +// +// Problems outside component: +// +// pkg/front_end/testcases/general/too_high_version/too_high/lib/too_high_lib.dart:1:1: Error: The language version 100.200 specified for the package 'too_high' is too high. The highest supported language version is 3.7. +// // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// ^ +// +library; +import self as self; + +import "package:too_high/too_high_lib.dart"; diff --git a/pkg/front_end/testcases/general/too_high_version/main.dart.strong.modular.expect b/pkg/front_end/testcases/general/too_high_version/main.dart.strong.modular.expect new file mode 100644 index 00000000000..8499a621dcf --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/main.dart.strong.modular.expect @@ -0,0 +1,11 @@ +// +// Problems outside component: +// +// pkg/front_end/testcases/general/too_high_version/too_high/lib/too_high_lib.dart:1:1: Error: The language version 100.200 specified for the package 'too_high' is too high. The highest supported language version is 3.7. +// // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// ^ +// +library; +import self as self; + +import "package:too_high/too_high_lib.dart"; diff --git a/pkg/front_end/testcases/general/too_high_version/main.dart.strong.outline.expect b/pkg/front_end/testcases/general/too_high_version/main.dart.strong.outline.expect new file mode 100644 index 00000000000..8499a621dcf --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/main.dart.strong.outline.expect @@ -0,0 +1,11 @@ +// +// Problems outside component: +// +// pkg/front_end/testcases/general/too_high_version/too_high/lib/too_high_lib.dart:1:1: Error: The language version 100.200 specified for the package 'too_high' is too high. The highest supported language version is 3.7. +// // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// ^ +// +library; +import self as self; + +import "package:too_high/too_high_lib.dart"; diff --git a/pkg/front_end/testcases/general/too_high_version/main.dart.strong.transformed.expect b/pkg/front_end/testcases/general/too_high_version/main.dart.strong.transformed.expect new file mode 100644 index 00000000000..181bb1f924e --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/main.dart.strong.transformed.expect @@ -0,0 +1,4 @@ +library; +import self as self; + +import "package:too_high/too_high_lib.dart"; diff --git a/pkg/front_end/testcases/general/too_high_version/main.dart.textual_outline.expect b/pkg/front_end/testcases/general/too_high_version/main.dart.textual_outline.expect new file mode 100644 index 00000000000..60bcb570c8a --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/main.dart.textual_outline.expect @@ -0,0 +1 @@ +import 'package:too_high/too_high_lib.dart'; diff --git a/pkg/front_end/testcases/general/too_high_version/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/too_high_version/main.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..60bcb570c8a --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/main.dart.textual_outline_modelled.expect @@ -0,0 +1 @@ +import 'package:too_high/too_high_lib.dart'; diff --git a/pkg/front_end/testcases/general/too_high_version/too_high/lib/too_high_lib.dart b/pkg/front_end/testcases/general/too_high_version/too_high/lib/too_high_lib.dart new file mode 100644 index 00000000000..e466fb74e65 --- /dev/null +++ b/pkg/front_end/testcases/general/too_high_version/too_high/lib/too_high_lib.dart @@ -0,0 +1,5 @@ +// Copyright (c) 2024, 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. + +method() {} diff --git a/pkg/front_end/testcases/general/version_too_high.dart b/pkg/front_end/testcases/general/version_too_high.dart new file mode 100644 index 00000000000..107866481b4 --- /dev/null +++ b/pkg/front_end/testcases/general/version_too_high.dart @@ -0,0 +1,7 @@ +// Copyright (c) 2024, 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. + +// @dart=100.200 + +method() {} diff --git a/pkg/front_end/testcases/general/version_too_high.dart.strong.expect b/pkg/front_end/testcases/general/version_too_high.dart.strong.expect new file mode 100644 index 00000000000..33c5a33db91 --- /dev/null +++ b/pkg/front_end/testcases/general/version_too_high.dart.strong.expect @@ -0,0 +1,11 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/general/version_too_high.dart:5:1: Error: The specified language version 100.200 is too high. The highest supported language version is 3.7. +// // @dart=100.200 +// ^^^^^^^^^^^^^^^^ +// +import self as self; + +static method method() → dynamic {} diff --git a/pkg/front_end/testcases/general/version_too_high.dart.strong.modular.expect b/pkg/front_end/testcases/general/version_too_high.dart.strong.modular.expect new file mode 100644 index 00000000000..33c5a33db91 --- /dev/null +++ b/pkg/front_end/testcases/general/version_too_high.dart.strong.modular.expect @@ -0,0 +1,11 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/general/version_too_high.dart:5:1: Error: The specified language version 100.200 is too high. The highest supported language version is 3.7. +// // @dart=100.200 +// ^^^^^^^^^^^^^^^^ +// +import self as self; + +static method method() → dynamic {} diff --git a/pkg/front_end/testcases/general/version_too_high.dart.strong.outline.expect b/pkg/front_end/testcases/general/version_too_high.dart.strong.outline.expect new file mode 100644 index 00000000000..04929fdbc81 --- /dev/null +++ b/pkg/front_end/testcases/general/version_too_high.dart.strong.outline.expect @@ -0,0 +1,12 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/general/version_too_high.dart:5:1: Error: The specified language version 100.200 is too high. The highest supported language version is 3.7. +// // @dart=100.200 +// ^^^^^^^^^^^^^^^^ +// +import self as self; + +static method method() → dynamic + ; diff --git a/pkg/front_end/testcases/general/version_too_high.dart.strong.transformed.expect b/pkg/front_end/testcases/general/version_too_high.dart.strong.transformed.expect new file mode 100644 index 00000000000..33c5a33db91 --- /dev/null +++ b/pkg/front_end/testcases/general/version_too_high.dart.strong.transformed.expect @@ -0,0 +1,11 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/general/version_too_high.dart:5:1: Error: The specified language version 100.200 is too high. The highest supported language version is 3.7. +// // @dart=100.200 +// ^^^^^^^^^^^^^^^^ +// +import self as self; + +static method method() → dynamic {} diff --git a/pkg/front_end/testcases/general/version_too_high.dart.textual_outline.expect b/pkg/front_end/testcases/general/version_too_high.dart.textual_outline.expect new file mode 100644 index 00000000000..8cad320c58c --- /dev/null +++ b/pkg/front_end/testcases/general/version_too_high.dart.textual_outline.expect @@ -0,0 +1,3 @@ +// @dart = 100.200 + +method() {} diff --git a/pkg/front_end/testcases/general/version_too_high.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/version_too_high.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..8cad320c58c --- /dev/null +++ b/pkg/front_end/testcases/general/version_too_high.dart.textual_outline_modelled.expect @@ -0,0 +1,3 @@ +// @dart = 100.200 + +method() {} diff --git a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.1.expect b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.1.expect index 3d47b8ecf00..b014f942a6f 100644 --- a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.1.expect @@ -3,7 +3,7 @@ library from "package:bar/bar.dart" as bar { // // Problems in library: // -// org-dartlang-test:///bar/lib/bar.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// org-dartlang-test:///bar/lib/bar.dart:1:1: Error: The language version 2.8 specified for the package 'bar' is too low. The lowest supported language version is 2.12. // // This file is in weak mode. // ^ // @@ -28,7 +28,7 @@ library from "package:foo/foo.dart" as foo { // // Problems in library: // -// org-dartlang-test:///foo/lib/foo.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// org-dartlang-test:///foo/lib/foo.dart:1:1: Error: The language version 2.8 specified for the package 'foo' is too low. The lowest supported language version is 2.12. // // This file is in weak mode. // ^ // diff --git a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.2.expect b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.2.expect index f7d378ac55e..88093c5ee65 100644 --- a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.2.expect @@ -3,7 +3,7 @@ library from "package:bar/bar.dart" as bar { // // Problems in library: // -// org-dartlang-test:///bar/lib/bar.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// org-dartlang-test:///bar/lib/bar.dart:1:1: Error: The language version 2.8 specified for the package 'bar' is too low. The lowest supported language version is 2.12. // // This file is in weak mode. // ^ // @@ -29,7 +29,7 @@ library from "package:foo/foo.dart" as foo { // // Problems in library: // -// org-dartlang-test:///foo/lib/foo.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// org-dartlang-test:///foo/lib/foo.dart:1:1: Error: The language version 2.8 specified for the package 'foo' is too low. The lowest supported language version is 2.12. // // This file is in weak mode. // ^ // diff --git a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.3.expect b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.3.expect index e4ad604daf9..fdf6077ec38 100644 --- a/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.3.expect +++ b/pkg/front_end/testcases/incremental/can_get_rid_of_nnbd_issue_error.yaml.world.3.expect @@ -3,7 +3,7 @@ library from "package:bar/bar.dart" as bar { // // Problems in library: // -// org-dartlang-test:///bar/lib/bar.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// org-dartlang-test:///bar/lib/bar.dart:1:1: Error: The language version 2.8 specified for the package 'bar' is too low. The lowest supported language version is 2.12. // // This file is in weak mode. // ^ // diff --git a/pkg/front_end/testcases/incremental/remove_language_version.yaml.world.1.expect b/pkg/front_end/testcases/incremental/remove_language_version.yaml.world.1.expect index a47bc1e266d..3ff56dfa59d 100644 --- a/pkg/front_end/testcases/incremental/remove_language_version.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/remove_language_version.yaml.world.1.expect @@ -3,7 +3,7 @@ library from "org-dartlang-test:///main.dart" as main { // // Problems in library: // -// org-dartlang-test:///main.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// org-dartlang-test:///main.dart:1:1: Error: The specified language version 2.9 is too low. The lowest supported language version is 2.12. // // @dart=2.9 // ^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart deleted file mode 100644 index e39959054e9..00000000000 --- a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2017, 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. - -// @dart=2.9 - -/*@testedFeatures=inference*/ -library test; - -test(dynamic o) async { - for (var /*@type=dynamic*/ x in o) {} - await for (var /*@type=dynamic*/ x in o) {} - int y; - for (y in o) {} - await for (y in o) {} -} - -main() {} diff --git a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.expect b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.expect deleted file mode 100644 index 6be1eeafa27..00000000000 --- a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.expect +++ /dev/null @@ -1,26 +0,0 @@ -library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/for_each_downcast_iterable.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. -// // @dart=2.9 -// ^^^^^^^^^^^^ -// -import self as self; -import "dart:core" as core; -import "dart:async" as asy; - -static method test(dynamic o) → dynamic async /* emittedValueType= dynamic */ { - for (dynamic x in o as{TypeError,ForDynamic} core::Iterable) { - } - await for (dynamic x in o as{TypeError,ForDynamic} asy::Stream) { - } - core::int y; - for (final dynamic #t1 in o as{TypeError,ForDynamic} core::Iterable) { - y = #t1 as{TypeError,ForDynamic} core::int; - } - await for (final dynamic #t2 in o as{TypeError,ForDynamic} asy::Stream) { - y = #t2 as{TypeError,ForDynamic} core::int; - } -} -static method main() → dynamic {} diff --git a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.modular.expect b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.modular.expect deleted file mode 100644 index 6be1eeafa27..00000000000 --- a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.modular.expect +++ /dev/null @@ -1,26 +0,0 @@ -library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/for_each_downcast_iterable.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. -// // @dart=2.9 -// ^^^^^^^^^^^^ -// -import self as self; -import "dart:core" as core; -import "dart:async" as asy; - -static method test(dynamic o) → dynamic async /* emittedValueType= dynamic */ { - for (dynamic x in o as{TypeError,ForDynamic} core::Iterable) { - } - await for (dynamic x in o as{TypeError,ForDynamic} asy::Stream) { - } - core::int y; - for (final dynamic #t1 in o as{TypeError,ForDynamic} core::Iterable) { - y = #t1 as{TypeError,ForDynamic} core::int; - } - await for (final dynamic #t2 in o as{TypeError,ForDynamic} asy::Stream) { - y = #t2 as{TypeError,ForDynamic} core::int; - } -} -static method main() → dynamic {} diff --git a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.outline.expect b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.outline.expect deleted file mode 100644 index 5cbefd98f9e..00000000000 --- a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.outline.expect +++ /dev/null @@ -1,14 +0,0 @@ -library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/for_each_downcast_iterable.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. -// // @dart=2.9 -// ^^^^^^^^^^^^ -// -import self as self; - -static method test(dynamic o) → dynamic async - ; -static method main() → dynamic - ; diff --git a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.transformed.expect deleted file mode 100644 index 92ac901b624..00000000000 --- a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.transformed.expect +++ /dev/null @@ -1,58 +0,0 @@ -library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/for_each_downcast_iterable.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. -// // @dart=2.9 -// ^^^^^^^^^^^^ -// -import self as self; -import "dart:core" as core; -import "dart:async" as asy; - -static method test(dynamic o) → dynamic async /* emittedValueType= dynamic */ { - { - synthesized core::Iterator :sync-for-iterator = (o as{TypeError,ForDynamic} core::Iterable).{core::Iterable::iterator}{core::Iterator}; - for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { - dynamic x = :sync-for-iterator.{core::Iterator::current}{dynamic}; - {} - } - } - { - synthesized asy::Stream :stream = o as{TypeError,ForDynamic} asy::Stream; - synthesized asy::_StreamIterator? :for-iterator = new asy::_StreamIterator::•(:stream); - try - while (let dynamic #t1 = asy::_asyncStarMoveNextHelper(:stream) in await :for-iterator.{asy::_StreamIterator::moveNext}(){() → asy::Future}) { - dynamic x = :for-iterator.{asy::_StreamIterator::current}{dynamic}; - {} - } - finally - if(!(:for-iterator.{asy::_StreamIterator::_subscription}{asy::StreamSubscription?} == null)) - await :for-iterator.{asy::_StreamIterator::cancel}(){() → asy::Future}; - } - core::int y; - { - synthesized core::Iterator :sync-for-iterator = (o as{TypeError,ForDynamic} core::Iterable).{core::Iterable::iterator}{core::Iterator}; - for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { - final dynamic #t2 = :sync-for-iterator.{core::Iterator::current}{dynamic}; - { - y = #t2 as{TypeError,ForDynamic} core::int; - } - } - } - { - synthesized asy::Stream :stream = o as{TypeError,ForDynamic} asy::Stream; - synthesized asy::_StreamIterator? :for-iterator = new asy::_StreamIterator::•(:stream); - try - while (let dynamic #t3 = asy::_asyncStarMoveNextHelper(:stream) in await :for-iterator.{asy::_StreamIterator::moveNext}(){() → asy::Future}) { - final dynamic #t4 = :for-iterator.{asy::_StreamIterator::current}{dynamic}; - { - y = #t4 as{TypeError,ForDynamic} core::int; - } - } - finally - if(!(:for-iterator.{asy::_StreamIterator::_subscription}{asy::StreamSubscription?} == null)) - await :for-iterator.{asy::_StreamIterator::cancel}(){() → asy::Future}; - } -} -static method main() → dynamic {} diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect index c35d4f0d386..db3c7cbc4e7 100644 --- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect @@ -17,7 +17,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart:1:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart = 2.11 // ^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.outline.expect index 7351be60b15..dc7708ec224 100644 --- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.outline.expect @@ -15,7 +15,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart:1:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart = 2.11 // ^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect index c35d4f0d386..db3c7cbc4e7 100644 --- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect @@ -17,7 +17,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart:1:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart = 2.11 // ^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect index 552128890ff..4cde0b81354 100644 --- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect @@ -12,7 +12,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart = 2.11 // ^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.modular.expect index 552128890ff..4cde0b81354 100644 --- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.modular.expect @@ -12,7 +12,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart = 2.11 // ^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.outline.expect index d1cfa19524a..27322a84f09 100644 --- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.outline.expect @@ -10,7 +10,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart = 2.11 // ^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect index 552128890ff..4cde0b81354 100644 --- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect @@ -12,7 +12,7 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart = 2.11 // ^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.expect index 6b0b186094d..28f1f36f9a7 100644 --- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.expect @@ -1,15 +1,15 @@ // // Problems outside component: // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart=2.11 // ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out_package' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // ^ // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out_package' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // ^ // diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.modular.expect index 6b0b186094d..28f1f36f9a7 100644 --- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.modular.expect @@ -1,15 +1,15 @@ // // Problems outside component: // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart=2.11 // ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out_package' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // ^ // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out_package' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // ^ // diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.outline.expect index 5a90e5a3b58..cb86f1f4a46 100644 --- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.outline.expect @@ -1,15 +1,15 @@ // // Problems outside component: // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12. // // @dart=2.11 // ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out_package' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // ^ // -// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12. +// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out_package' is too low. The lowest supported language version is 2.12. // // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // ^ // diff --git a/pkg/front_end/tool/_fasta/generate_messages_lib.dart b/pkg/front_end/tool/_fasta/generate_messages_lib.dart index 794fce5ba5a..11e36286ae3 100644 --- a/pkg/front_end/tool/_fasta/generate_messages_lib.dart +++ b/pkg/front_end/tool/_fasta/generate_messages_lib.dart @@ -328,6 +328,16 @@ Template compileTemplate(String name, int? index, String? problemMessage, arguments.add("'$name': count2"); break; + case "count3": + parameters.add("int count3"); + arguments.add("'$name': count3"); + break; + + case "count4": + parameters.add("int count4"); + arguments.add("'$name': count4"); + break; + case "constant": parameters.add("Constant _constant"); ensureLabeler();