[dart2js] More shared_messages.dart cleanup

- Remove references to deleted file.
- Remove message that is unreachable in kernel.

Change-Id: I5fe772a3a6fbd00b31d085f10c47d63778a64217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214071
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
Stephen Adams 2021-09-22 19:20:54 +00:00 committed by commit-bot@chromium.org
parent 1c125b4868
commit f1e6092dd8
5 changed files with 4 additions and 46 deletions

View file

@ -53,8 +53,7 @@
'pkg/analyzer/lib/src/dart/error/hint_codes\\.dart|'
'pkg/analyzer/lib/src/dart/error/lint_codes\\.dart|'
'pkg/analyzer/lib/src/dart/error/todo_codes\\.dart|'
'pkg/analyzer/lib/src/html/error/html_codes\\.dart|'
'pkg/dart_messages/lib/shared_messages\\.dart'
'pkg/analyzer/lib/src/html/error/html_codes\\.dart'
')$'
)
},

View file

@ -631,8 +631,6 @@ _TODO: complete the documentation for the following files_.
`lib/src/diagnostics`
`lib/src/diagnostics/invariant.dart`
`lib/src/diagnostics/generated`
`lib/src/diagnostics/generated/shared_messages.dart`
`lib/src/diagnostics/messages.dart`
`lib/src/diagnostics/source_span.dart`
`lib/src/diagnostics/code_location.dart`

View file

@ -23,7 +23,6 @@ const DONT_KNOW_HOW_TO_FIX = "Computer says no!";
/// Keys for the [MessageTemplate]s.
enum MessageKind {
ABSTRACT_GETTER,
COMPILER_CRASHED,
COMPLEX_RETURNING_NSM,
COMPLEX_THROWING_NSM,
@ -114,21 +113,6 @@ class MessageTemplate {
MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
"Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."),
MessageKind.ABSTRACT_GETTER: MessageTemplate(
MessageKind.ABSTRACT_GETTER,
"The getter '#{name}' has no implementation in "
"class '#{class}'.",
howToFix: "Try adding a body to '#{name}' or declaring "
"'#{class}' to be 'abstract'.",
examples: [
"""
class Class {
get getter;
}
main() => new Class();
"""
]),
MessageKind.INVALID_METADATA: MessageTemplate(
MessageKind.INVALID_METADATA,
"A metadata annotation must be either a reference to a compile-time "

View file

@ -94,23 +94,6 @@ class A {
main() => new A();
'''),
const Test(
'Js-interop class with abstract getter.',
'''
@JS()
library test;
import 'package:js/js.dart';
@JS()
class A {
get foo;
}
main() => new A();
''',
warnings: const [MessageKind.ABSTRACT_GETTER],
skipForKernel: true),
const Test('Js-interop class that extends a js-interop class.', '''
@JS()
library test;
@ -392,18 +375,15 @@ class Test {
final Map<String, String> _sources;
final List<MessageKind> errors;
final List<MessageKind> warnings;
final bool skipForKernel;
const Test(this.name, this._source,
{this.errors: const <MessageKind>[],
this.warnings: const <MessageKind>[],
this.skipForKernel: false})
this.warnings: const <MessageKind>[]})
: _sources = null;
const Test.multi(this.name, this._sources,
{this.errors: const <MessageKind>[],
this.warnings: const <MessageKind>[],
this.skipForKernel: false})
this.warnings: const <MessageKind>[]})
: _source = null;
String get source => _source != null ? _source : _sources['main.dart'];
@ -415,9 +395,7 @@ class Test {
runTest(Test test) async {
print('==${test.name}======================================================');
print(test.source);
if (!test.skipForKernel) {
await runTestInternal(test);
}
await runTestInternal(test);
}
runTestInternal(Test test) async {

View file

@ -8,7 +8,6 @@
-- Note: if you move this file to a different location, please make sure that
-- you also update these references to it:
-- * pkg/compiler/lib/src/diagnostics/messages.dart
-- * pkg/dart_messages/lib/shared_messages.dart
-- * pkg/_fe_analyzer_shared/lib/src/base/errors.dart
-- * https://github.com/dart-lang/linter/
-->