mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
quick fix for STATIC_OPERATOR
See: https://github.com/dart-lang/sdk/issues/55917 Change-Id: I41dd40a11e98340dc90f3673c8c6b37e3bf3d7f2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370161 Commit-Queue: Phil Quitslund <pquitslund@google.com> Auto-Submit: Phil Quitslund <pquitslund@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
dd89732126
commit
6424397cbf
|
@ -45,8 +45,8 @@
|
|||
#
|
||||
# Stats:
|
||||
# - 42 "needsEvaluation"
|
||||
# - 336 "needsFix"
|
||||
# - 415 "hasFix"
|
||||
# - 335 "needsFix"
|
||||
# - 416 "hasFix"
|
||||
# - 516 "noFix"
|
||||
|
||||
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
|
||||
|
@ -905,35 +905,35 @@ CompileTimeErrorCode.INVALID_ASSIGNMENT:
|
|||
CompileTimeErrorCode.INVALID_CAST_FUNCTION:
|
||||
status: noFix
|
||||
notes: |-
|
||||
Removed i Dart 3.0
|
||||
Removed in Dart 3.0
|
||||
CompileTimeErrorCode.INVALID_CAST_FUNCTION_EXPR:
|
||||
status: noFix
|
||||
notes: |-
|
||||
Removed i Dart 3.0
|
||||
Removed in Dart 3.0
|
||||
CompileTimeErrorCode.INVALID_CAST_LITERAL:
|
||||
status: noFix
|
||||
notes: |-
|
||||
Removed i Dart 3.0
|
||||
Removed in Dart 3.0
|
||||
CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST:
|
||||
status: noFix
|
||||
notes: |-
|
||||
Removed i Dart 3.0
|
||||
Removed in Dart 3.0
|
||||
CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP:
|
||||
status: noFix
|
||||
notes: |-
|
||||
Removed i Dart 3.0
|
||||
Removed in Dart 3.0
|
||||
CompileTimeErrorCode.INVALID_CAST_LITERAL_SET:
|
||||
status: noFix
|
||||
notes: |-
|
||||
Removed i Dart 3.0
|
||||
Removed in Dart 3.0
|
||||
CompileTimeErrorCode.INVALID_CAST_METHOD:
|
||||
status: noFix
|
||||
notes: |-
|
||||
Removed i Dart 3.0
|
||||
Removed in Dart 3.0
|
||||
CompileTimeErrorCode.INVALID_CAST_NEW_EXPR:
|
||||
status: noFix
|
||||
notes: |-
|
||||
Removed i Dart 3.0
|
||||
Removed in Dart 3.0
|
||||
CompileTimeErrorCode.INVALID_CONSTANT:
|
||||
status: noFix
|
||||
notes: |-
|
||||
|
@ -3223,9 +3223,7 @@ ParserErrorCode.STATIC_GETTER_WITHOUT_BODY:
|
|||
notes: |-
|
||||
Add an empty body.
|
||||
ParserErrorCode.STATIC_OPERATOR:
|
||||
status: needsFix
|
||||
notes: |-
|
||||
Remove the `static` keyword.
|
||||
status: hasFix
|
||||
ParserErrorCode.STATIC_SETTER_WITHOUT_BODY:
|
||||
status: needsFix
|
||||
notes: |-
|
||||
|
|
|
@ -1472,6 +1472,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
|
|||
ParserErrorCode.STATIC_CONSTRUCTOR: [
|
||||
RemoveLexeme.keyword,
|
||||
],
|
||||
ParserErrorCode.STATIC_OPERATOR: [
|
||||
RemoveLexeme.keyword,
|
||||
],
|
||||
ParserErrorCode.VAR_AND_TYPE: [
|
||||
RemoveTypeAnnotation.fixVarAndType,
|
||||
RemoveVar.new,
|
||||
|
|
|
@ -405,6 +405,19 @@ class C {
|
|||
''');
|
||||
}
|
||||
|
||||
Future<void> test_staticOperator() async {
|
||||
await resolveTestCode('''
|
||||
class C {
|
||||
static operator +(int x) => 1;
|
||||
}
|
||||
''');
|
||||
await assertHasFix('''
|
||||
class C {
|
||||
operator +(int x) => 1;
|
||||
}
|
||||
''');
|
||||
}
|
||||
|
||||
Future<void> test_staticTopLevelDeclaration_enum() async {
|
||||
await resolveTestCode(r'''
|
||||
static enum E { v }
|
||||
|
|
Loading…
Reference in a new issue