Skip to content

Commit 0649115

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Rename VoidWithTypeParameters to VoidWithTypeArguments.
Change-Id: I5df6a49f0b27b6edfe2ce0f677d5f898900d8384 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138341 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent a742539 commit 0649115

10 files changed

Lines changed: 25 additions & 25 deletions

File tree

pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8682,14 +8682,14 @@ const MessageCode messageVoidExpression = const MessageCode("VoidExpression",
86828682
message: r"""This expression has type 'void' and can't be used.""");
86838683

86848684
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
8685-
const Code<Null> codeVoidWithTypeParameters = messageVoidWithTypeParameters;
8685+
const Code<Null> codeVoidWithTypeArguments = messageVoidWithTypeArguments;
86868686

86878687
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
8688-
const MessageCode messageVoidWithTypeParameters = const MessageCode(
8689-
"VoidWithTypeParameters",
8688+
const MessageCode messageVoidWithTypeArguments = const MessageCode(
8689+
"VoidWithTypeArguments",
86908690
index: 100,
8691-
message: r"""Type 'void' can't have type parameters.""",
8692-
tip: r"""Try removing the type parameters.""");
8691+
message: r"""Type 'void' can't have type arguments.""",
8692+
tip: r"""Try removing the type arguments.""");
86938693

86948694
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
86958695
const Template<

pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class VoidType implements TypeInfo {
364364
if (typeParam != noTypeParamOrArg) {
365365
hasTypeArguments = true;
366366
parser.reportRecoverableError(
367-
token.next, codes.messageVoidWithTypeParameters);
367+
token.next, codes.messageVoidWithTypeArguments);
368368
token = typeParam.parseArguments(token, parser);
369369
}
370370
}

pkg/analyzer/lib/src/dart/error/syntactic_errors.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ class ParserErrorCode extends ErrorCode {
882882
"replacing it with the name of the return type.");
883883

884884
static const ParserErrorCode VOID_WITH_TYPE_ARGUMENTS =
885-
_VOID_WITH_TYPE_PARAMETERS;
885+
_VOID_WITH_TYPE_ARGUMENTS;
886886

887887
/**
888888
* Initialize a newly created error code to have the given [name]. The message

pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ final fastaAnalyzerErrorCodes = <ErrorCode>[
107107
_MULTIPLE_VARIANCE_MODIFIERS,
108108
_INVALID_USE_OF_COVARIANT_IN_EXTENSION,
109109
_TYPE_PARAMETER_ON_CONSTRUCTOR,
110-
_VOID_WITH_TYPE_PARAMETERS,
110+
_VOID_WITH_TYPE_ARGUMENTS,
111111
];
112112

113113
const ParserErrorCode _ABSTRACT_CLASS_MEMBER = ParserErrorCode(
@@ -575,9 +575,9 @@ const ParserErrorCode _VAR_RETURN_TYPE = ParserErrorCode(
575575
correction:
576576
"Try removing the keyword 'var', or replacing it with the name of the return type.");
577577

578-
const ParserErrorCode _VOID_WITH_TYPE_PARAMETERS = ParserErrorCode(
579-
'VOID_WITH_TYPE_PARAMETERS', r"Type 'void' can't have type parameters.",
580-
correction: "Try removing the type parameters.");
578+
const ParserErrorCode _VOID_WITH_TYPE_ARGUMENTS = ParserErrorCode(
579+
'VOID_WITH_TYPE_ARGUMENTS', r"Type 'void' can't have type arguments.",
580+
correction: "Try removing the type arguments.");
581581

582582
const ParserErrorCode _WITH_BEFORE_EXTENDS = ParserErrorCode(
583583
'WITH_BEFORE_EXTENDS',

pkg/front_end/messages.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -971,11 +971,11 @@ InvalidVoid:
971971
- "void x; main() {}"
972972
- "foo(void x) {} main() { foo(null); }"
973973

974-
VoidWithTypeParameters:
975-
template: "Type 'void' can't have type parameters."
976-
tip: "Try removing the type parameters."
974+
VoidWithTypeArguments:
975+
template: "Type 'void' can't have type arguments."
976+
tip: "Try removing the type arguments."
977977
index: 100
978-
analyzerCode: ParserErrorCode.VOID_WITH_TYPE_PARAMETERS
978+
analyzerCode: ParserErrorCode.VOID_WITH_TYPE_ARGUMENTS
979979
script:
980980
- "void<int> f() {}"
981981

pkg/front_end/parser_testcases/error_recovery/issue_39958_01.dart.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Problems reported:
22

3-
parser/error_recovery/issue_39958_01:1:5: Type 'void' can't have type parameters.
3+
parser/error_recovery/issue_39958_01:1:5: Type 'void' can't have type arguments.
44
void<int> f() {}
55
^
66

@@ -9,7 +9,7 @@ beginCompilationUnit(void)
99
endMetadataStar(0)
1010
beginTopLevelMember(void)
1111
beginTopLevelMethod(, null)
12-
handleRecoverableError(VoidWithTypeParameters, <, <)
12+
handleRecoverableError(VoidWithTypeArguments, <, <)
1313
beginTypeArguments(<)
1414
handleIdentifier(int, typeReference)
1515
handleNoTypeArguments(>)

pkg/front_end/parser_testcases/error_recovery/issue_39958_01.dart.intertwined.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ parseUnit(void)
1010
listener: beginTopLevelMember(void)
1111
parseTopLevelMethod(, null, , Instance of 'VoidType', null, f)
1212
listener: beginTopLevelMethod(, null)
13-
reportRecoverableError(<, VoidWithTypeParameters)
14-
listener: handleRecoverableError(VoidWithTypeParameters, <, <)
13+
reportRecoverableError(<, VoidWithTypeArguments)
14+
listener: handleRecoverableError(VoidWithTypeArguments, <, <)
1515
listener: beginTypeArguments(<)
1616
listener: handleIdentifier(int, typeReference)
1717
listener: handleNoTypeArguments(>)

pkg/front_end/testcases/general/type_parameters_on_void.dart.outline.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ library;
22
//
33
// Problems in library:
44
//
5-
// pkg/front_end/testcases/general/type_parameters_on_void.dart:1:5: Error: Type 'void' can't have type parameters.
6-
// Try removing the type parameters.
5+
// pkg/front_end/testcases/general/type_parameters_on_void.dart:1:5: Error: Type 'void' can't have type arguments.
6+
// Try removing the type arguments.
77
// void<int> f() {}
88
// ^
99
//

pkg/front_end/testcases/general/type_parameters_on_void.dart.strong.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ library;
22
//
33
// Problems in library:
44
//
5-
// pkg/front_end/testcases/general/type_parameters_on_void.dart:1:5: Error: Type 'void' can't have type parameters.
6-
// Try removing the type parameters.
5+
// pkg/front_end/testcases/general/type_parameters_on_void.dart:1:5: Error: Type 'void' can't have type arguments.
6+
// Try removing the type arguments.
77
// void<int> f() {}
88
// ^
99
//

pkg/front_end/testcases/general/type_parameters_on_void.dart.strong.transformed.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ library;
22
//
33
// Problems in library:
44
//
5-
// pkg/front_end/testcases/general/type_parameters_on_void.dart:1:5: Error: Type 'void' can't have type parameters.
6-
// Try removing the type parameters.
5+
// pkg/front_end/testcases/general/type_parameters_on_void.dart:1:5: Error: Type 'void' can't have type arguments.
6+
// Try removing the type arguments.
77
// void<int> f() {}
88
// ^
99
//

0 commit comments

Comments
 (0)