mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 15:11:35 +00:00
Remove two more deprecated_ methods from BodyBuilder
Change-Id: I89597436a45c937a735e0a511972237a1cfc2378 Reviewed-on: https://dart-review.googlesource.com/67201 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
01e69cc0c4
commit
56bd1fc6f7
|
@ -340,56 +340,6 @@ class StrongModeStaticTypeAnalyzer2Test_Kernel
|
||||||
return super.test_notInstantiatedBound_class_error_recursion_typedef();
|
return super.test_notInstantiatedBound_class_error_recursion_typedef();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
@failingTest
|
|
||||||
test_notInstantiatedBound_error_class_argument() {
|
|
||||||
return super.test_notInstantiatedBound_error_class_argument();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
@failingTest
|
|
||||||
test_notInstantiatedBound_error_class_argument2() {
|
|
||||||
return super.test_notInstantiatedBound_error_class_argument2();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
@failingTest
|
|
||||||
test_notInstantiatedBound_error_class_direct() {
|
|
||||||
// Expected 1 errors of type
|
|
||||||
// StrongModeCode.STRONG_MODE_NOT_INSTANTIATED_BOUND, found 0
|
|
||||||
return super.test_notInstantiatedBound_error_class_direct();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
@failingTest
|
|
||||||
test_notInstantiatedBound_error_class_indirect() {
|
|
||||||
return super.test_notInstantiatedBound_error_class_indirect();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
@failingTest
|
|
||||||
test_notInstantiatedBound_error_functionType() {
|
|
||||||
return super.test_notInstantiatedBound_error_functionType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
@failingTest
|
|
||||||
test_notInstantiatedBound_error_typedef_argument() {
|
|
||||||
return super.test_notInstantiatedBound_error_typedef_argument();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
@failingTest
|
|
||||||
test_notInstantiatedBound_error_typedef_argument2() {
|
|
||||||
return super.test_notInstantiatedBound_error_typedef_argument2();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
@failingTest
|
|
||||||
test_notInstantiatedBound_error_typedef_direct() {
|
|
||||||
return super.test_notInstantiatedBound_error_typedef_direct();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@failingTest
|
@failingTest
|
||||||
test_setterWithDynamicTypeIsError() async {
|
test_setterWithDynamicTypeIsError() async {
|
||||||
|
|
|
@ -339,7 +339,7 @@ const Code<Message Function(String name)>
|
||||||
const Code<Message Function(String name)>(
|
const Code<Message Function(String name)>(
|
||||||
"BoundIssueViaRawTypeWithNonSimpleBounds",
|
"BoundIssueViaRawTypeWithNonSimpleBounds",
|
||||||
templateBoundIssueViaRawTypeWithNonSimpleBounds,
|
templateBoundIssueViaRawTypeWithNonSimpleBounds,
|
||||||
analyzerCode: "SNOT_INSTANTIATED_BOUND",
|
analyzerCode: "NOT_INSTANTIATED_BOUND",
|
||||||
dart2jsCode: "*fatal*",
|
dart2jsCode: "*fatal*",
|
||||||
severity: Severity.error);
|
severity: Severity.error);
|
||||||
|
|
||||||
|
@ -364,6 +364,26 @@ const MessageCode messageBreakOutsideOfLoop = const MessageCode(
|
||||||
r"""A break statement can't be used outside of a loop or switch statement.""",
|
r"""A break statement can't be used outside of a loop or switch statement.""",
|
||||||
tip: r"""Try removing the break statement.""");
|
tip: r"""Try removing the break statement.""");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Template<Message Function(String name)>
|
||||||
|
templateBreakTargetOutsideFunction =
|
||||||
|
const Template<Message Function(String name)>(
|
||||||
|
messageTemplate: r"""Can't break to '#name' in a different function.""",
|
||||||
|
withArguments: _withArgumentsBreakTargetOutsideFunction);
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Message Function(String name)> codeBreakTargetOutsideFunction =
|
||||||
|
const Code<Message Function(String name)>(
|
||||||
|
"BreakTargetOutsideFunction", templateBreakTargetOutsideFunction,
|
||||||
|
analyzerCode: "LABEL_IN_OUTER_SCOPE", dart2jsCode: "*fatal*");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
Message _withArgumentsBreakTargetOutsideFunction(String name) {
|
||||||
|
return new Message(codeBreakTargetOutsideFunction,
|
||||||
|
message: """Can't break to '${name}' in a different function.""",
|
||||||
|
arguments: {'name': name});
|
||||||
|
}
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Template<Message Function(Token token)> templateBuiltInIdentifierAsType =
|
const Template<Message Function(Token token)> templateBuiltInIdentifierAsType =
|
||||||
const Template<Message Function(Token token)>(
|
const Template<Message Function(Token token)>(
|
||||||
|
@ -454,6 +474,16 @@ const MessageCode messageCannotAssignToParenthesizedExpression =
|
||||||
dart2jsCode: "*fatal*",
|
dart2jsCode: "*fatal*",
|
||||||
message: r"""Can't assign to a parenthesized expression.""");
|
message: r"""Can't assign to a parenthesized expression.""");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Null> codeCannotAssignToSuper = messageCannotAssignToSuper;
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const MessageCode messageCannotAssignToSuper = const MessageCode(
|
||||||
|
"CannotAssignToSuper",
|
||||||
|
analyzerCode: "NOT_AN_LVALUE",
|
||||||
|
dart2jsCode: "*fatal*",
|
||||||
|
message: r"""Can't assign to super.""");
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Template<Message Function(String string)> templateCannotReadPackagesFile =
|
const Template<Message Function(String string)> templateCannotReadPackagesFile =
|
||||||
const Template<Message Function(String string)>(
|
const Template<Message Function(String string)>(
|
||||||
|
@ -1448,6 +1478,16 @@ Message _withArgumentsConstructorWithWrongNameContext(String name) {
|
||||||
arguments: {'name': name});
|
arguments: {'name': name});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Null> codeContinueLabelNotTarget = messageContinueLabelNotTarget;
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const MessageCode messageContinueLabelNotTarget = const MessageCode(
|
||||||
|
"ContinueLabelNotTarget",
|
||||||
|
analyzerCode: "LABEL_UNDEFINED",
|
||||||
|
dart2jsCode: "*fatal*",
|
||||||
|
message: r"""Target of continue must be a label.""");
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Code<Null> codeContinueOutsideOfLoop = messageContinueOutsideOfLoop;
|
const Code<Null> codeContinueOutsideOfLoop = messageContinueOutsideOfLoop;
|
||||||
|
|
||||||
|
@ -1460,6 +1500,27 @@ const MessageCode messageContinueOutsideOfLoop = const MessageCode(
|
||||||
r"""A continue statement can't be used outside of a loop or switch statement.""",
|
r"""A continue statement can't be used outside of a loop or switch statement.""",
|
||||||
tip: r"""Try removing the continue statement.""");
|
tip: r"""Try removing the continue statement.""");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Template<Message Function(String name)>
|
||||||
|
templateContinueTargetOutsideFunction =
|
||||||
|
const Template<Message Function(String name)>(
|
||||||
|
messageTemplate:
|
||||||
|
r"""Can't continue at '#name' in a different function.""",
|
||||||
|
withArguments: _withArgumentsContinueTargetOutsideFunction);
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Message Function(String name)> codeContinueTargetOutsideFunction =
|
||||||
|
const Code<Message Function(String name)>(
|
||||||
|
"ContinueTargetOutsideFunction", templateContinueTargetOutsideFunction,
|
||||||
|
analyzerCode: "LABEL_IN_OUTER_SCOPE", dart2jsCode: "*fatal*");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
Message _withArgumentsContinueTargetOutsideFunction(String name) {
|
||||||
|
return new Message(codeContinueTargetOutsideFunction,
|
||||||
|
message: """Can't continue at '${name}' in a different function.""",
|
||||||
|
arguments: {'name': name});
|
||||||
|
}
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Code<Null> codeContinueWithoutLabelInCase =
|
const Code<Null> codeContinueWithoutLabelInCase =
|
||||||
messageContinueWithoutLabelInCase;
|
messageContinueWithoutLabelInCase;
|
||||||
|
@ -2191,6 +2252,17 @@ const MessageCode messageEnumInClass = const MessageCode("EnumInClass",
|
||||||
message: r"""Enums can't be declared inside classes.""",
|
message: r"""Enums can't be declared inside classes.""",
|
||||||
tip: r"""Try moving the enum to the top-level.""");
|
tip: r"""Try moving the enum to the top-level.""");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Null> codeEnumInstantiation = messageEnumInstantiation;
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const MessageCode messageEnumInstantiation = const MessageCode(
|
||||||
|
"EnumInstantiation",
|
||||||
|
analyzerCode: "INSTANTIATE_ENUM",
|
||||||
|
dart2jsCode: "*fatal*",
|
||||||
|
severity: Severity.error,
|
||||||
|
message: r"""Enums can't be instantiated.""");
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Code<Null> codeEqualityCannotBeEqualityOperand =
|
const Code<Null> codeEqualityCannotBeEqualityOperand =
|
||||||
messageEqualityCannotBeEqualityOperand;
|
messageEqualityCannotBeEqualityOperand;
|
||||||
|
@ -2442,6 +2514,16 @@ Message _withArgumentsExpectedIdentifier(Token token) {
|
||||||
arguments: {'token': token});
|
arguments: {'token': token});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Null> codeExpectedNamedArgument = messageExpectedNamedArgument;
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const MessageCode messageExpectedNamedArgument = const MessageCode(
|
||||||
|
"ExpectedNamedArgument",
|
||||||
|
analyzerCode: "EXTRA_POSITIONAL_ARGUMENTS",
|
||||||
|
dart2jsCode: "*fatal*",
|
||||||
|
message: r"""Expected named argument.""");
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Code<Null> codeExpectedOneExpression = messageExpectedOneExpression;
|
const Code<Null> codeExpectedOneExpression = messageExpectedOneExpression;
|
||||||
|
|
||||||
|
@ -4034,6 +4116,24 @@ const MessageCode messageInvalidAwaitFor = const MessageCode("InvalidAwaitFor",
|
||||||
r"""The keyword 'await' isn't allowed for a normal 'for' statement.""",
|
r"""The keyword 'await' isn't allowed for a normal 'for' statement.""",
|
||||||
tip: r"""Try removing the keyword, or use a for-each statement.""");
|
tip: r"""Try removing the keyword, or use a for-each statement.""");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Template<Message Function(String name)> templateInvalidBreakTarget =
|
||||||
|
const Template<Message Function(String name)>(
|
||||||
|
messageTemplate: r"""Can't break to '#name'.""",
|
||||||
|
withArguments: _withArgumentsInvalidBreakTarget);
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Message Function(String name)> codeInvalidBreakTarget =
|
||||||
|
const Code<Message Function(String name)>(
|
||||||
|
"InvalidBreakTarget", templateInvalidBreakTarget,
|
||||||
|
dart2jsCode: "*fatal*");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
Message _withArgumentsInvalidBreakTarget(String name) {
|
||||||
|
return new Message(codeInvalidBreakTarget,
|
||||||
|
message: """Can't break to '${name}'.""", arguments: {'name': name});
|
||||||
|
}
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Template<
|
const Template<
|
||||||
Message Function(
|
Message Function(
|
||||||
|
@ -4323,6 +4423,24 @@ const MessageCode messageInvalidCodePoint = const MessageCode(
|
||||||
message:
|
message:
|
||||||
r"""The escape sequence starting with '\u' isn't a valid code point.""");
|
r"""The escape sequence starting with '\u' isn't a valid code point.""");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Template<Message Function(String name)> templateInvalidContinueTarget =
|
||||||
|
const Template<Message Function(String name)>(
|
||||||
|
messageTemplate: r"""Can't continue at '#name'.""",
|
||||||
|
withArguments: _withArgumentsInvalidContinueTarget);
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Message Function(String name)> codeInvalidContinueTarget =
|
||||||
|
const Code<Message Function(String name)>(
|
||||||
|
"InvalidContinueTarget", templateInvalidContinueTarget,
|
||||||
|
dart2jsCode: "*fatal*");
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
Message _withArgumentsInvalidContinueTarget(String name) {
|
||||||
|
return new Message(codeInvalidContinueTarget,
|
||||||
|
message: """Can't continue at '${name}'.""", arguments: {'name': name});
|
||||||
|
}
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Code<Null> codeInvalidHexEscape = messageInvalidHexEscape;
|
const Code<Null> codeInvalidHexEscape = messageInvalidHexEscape;
|
||||||
|
|
||||||
|
@ -4630,6 +4748,15 @@ Message _withArgumentsMethodNotFound(String name) {
|
||||||
message: """Method not found: '${name}'.""", arguments: {'name': name});
|
message: """Method not found: '${name}'.""", arguments: {'name': name});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const Code<Null> codeMissingArgumentList = messageMissingArgumentList;
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
|
const MessageCode messageMissingArgumentList = const MessageCode(
|
||||||
|
"MissingArgumentList",
|
||||||
|
severity: Severity.error,
|
||||||
|
message: r"""Constructor invocations must have an argument list.""");
|
||||||
|
|
||||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||||
const Code<Null> codeMissingAssignableSelector =
|
const Code<Null> codeMissingAssignableSelector =
|
||||||
messageMissingAssignableSelector;
|
messageMissingAssignableSelector;
|
||||||
|
|
|
@ -953,8 +953,8 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
// TODO(ahe): Change this to a null check.
|
// TODO(ahe): Change this to a null check.
|
||||||
int offset = builder.body?.fileOffset ?? builder.charOffset;
|
int offset = builder.body?.fileOffset ?? builder.charOffset;
|
||||||
constructor.initializers.add(buildInvalidInitializer(
|
constructor.initializers.add(buildInvalidInitializer(
|
||||||
deprecated_buildCompileTimeError(
|
buildCompileTimeErrorExpression(
|
||||||
null, offset, fasta.messageConstructorNotSync),
|
fasta.messageConstructorNotSync, offset),
|
||||||
offset));
|
offset));
|
||||||
}
|
}
|
||||||
if (needsImplicitSuperInitializer) {
|
if (needsImplicitSuperInitializer) {
|
||||||
|
@ -1016,8 +1016,9 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
if (i > firstNamedArgumentIndex) {
|
if (i > firstNamedArgumentIndex) {
|
||||||
arguments[i] = new NamedExpression(
|
arguments[i] = new NamedExpression(
|
||||||
"#$i",
|
"#$i",
|
||||||
deprecated_buildCompileTimeError(
|
buildCompileTimeErrorExpression(
|
||||||
"Expected named argument.", forest.readOffset(argument)))
|
fasta.messageExpectedNamedArgument,
|
||||||
|
forest.readOffset(argument)))
|
||||||
..fileOffset = beginToken.charOffset;
|
..fileOffset = beginToken.charOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1167,8 +1168,9 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
negate = true;
|
negate = true;
|
||||||
}
|
}
|
||||||
if (!isBinaryOperator(operator) && !isMinusOperator(operator)) {
|
if (!isBinaryOperator(operator) && !isMinusOperator(operator)) {
|
||||||
return deprecated_buildCompileTimeError(
|
return buildCompileTimeErrorExpression(
|
||||||
"Not an operator: '$operator'.", token.charOffset);
|
fasta.templateInvalidOperator.withArguments(token), token.charOffset,
|
||||||
|
length: token.length);
|
||||||
} else {
|
} else {
|
||||||
Expression result = buildMethodInvocation(a, new Name(operator),
|
Expression result = buildMethodInvocation(a, new Name(operator),
|
||||||
forest.arguments(<Expression>[b], noLocation), token.charOffset,
|
forest.arguments(<Expression>[b], noLocation), token.charOffset,
|
||||||
|
@ -1803,17 +1805,17 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
// silent if the next token is `in`. Since a for-in loop can only have
|
// silent if the next token is `in`. Since a for-in loop can only have
|
||||||
// one variable it must be followed by `in`.
|
// one variable it must be followed by `in`.
|
||||||
if (isConst) {
|
if (isConst) {
|
||||||
initializer = deprecated_buildCompileTimeError(
|
initializer = buildCompileTimeErrorExpression(
|
||||||
null,
|
|
||||||
token.charOffset,
|
|
||||||
fasta.templateConstFieldWithoutInitializer
|
fasta.templateConstFieldWithoutInitializer
|
||||||
.withArguments(token.lexeme));
|
.withArguments(token.lexeme),
|
||||||
} else if (isFinal) {
|
|
||||||
initializer = deprecated_buildCompileTimeError(
|
|
||||||
null,
|
|
||||||
token.charOffset,
|
token.charOffset,
|
||||||
|
length: token.length);
|
||||||
|
} else if (isFinal) {
|
||||||
|
initializer = buildCompileTimeErrorExpression(
|
||||||
fasta.templateFinalFieldWithoutInitializer
|
fasta.templateFinalFieldWithoutInitializer
|
||||||
.withArguments(token.lexeme));
|
.withArguments(token.lexeme),
|
||||||
|
token.charOffset,
|
||||||
|
length: token.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pushNewLocalVariable(initializer);
|
pushNewLocalVariable(initializer);
|
||||||
|
@ -3003,8 +3005,9 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
int charOffset,
|
int charOffset,
|
||||||
Constness constness) {
|
Constness constness) {
|
||||||
if (arguments == null) {
|
if (arguments == null) {
|
||||||
return deprecated_buildCompileTimeError(
|
return buildCompileTimeErrorExpression(
|
||||||
"No arguments.", nameToken.charOffset);
|
fasta.messageMissingArgumentList, nameToken.charOffset,
|
||||||
|
length: nameToken.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeArguments != null) {
|
if (typeArguments != null) {
|
||||||
|
@ -3015,8 +3018,9 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
String errorName;
|
String errorName;
|
||||||
if (type is ClassBuilder<TypeBuilder, Object>) {
|
if (type is ClassBuilder<TypeBuilder, Object>) {
|
||||||
if (type is EnumBuilder<TypeBuilder, Object>) {
|
if (type is EnumBuilder<TypeBuilder, Object>) {
|
||||||
return deprecated_buildCompileTimeError(
|
return buildCompileTimeErrorExpression(
|
||||||
"An enum class can't be instantiated.", nameToken.charOffset);
|
fasta.messageEnumInstantiation, nameToken.charOffset,
|
||||||
|
length: nameToken.length);
|
||||||
}
|
}
|
||||||
Declaration b =
|
Declaration b =
|
||||||
type.findConstructorOrFactory(name, charOffset, uri, library);
|
type.findConstructorOrFactory(name, charOffset, uri, library);
|
||||||
|
@ -3312,8 +3316,9 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
..fileOffset = beginToken.charOffset
|
..fileOffset = beginToken.charOffset
|
||||||
..fileEndOffset = token.charOffset);
|
..fileEndOffset = token.charOffset);
|
||||||
if (constantContext != ConstantContext.none) {
|
if (constantContext != ConstantContext.none) {
|
||||||
push(deprecated_buildCompileTimeError(
|
push(buildCompileTimeErrorExpression(
|
||||||
null, formals.charOffset, fasta.messageNotAConstantExpression));
|
fasta.messageNotAConstantExpression, formals.charOffset,
|
||||||
|
length: formals.charLength));
|
||||||
} else {
|
} else {
|
||||||
push(new FunctionExpressionJudgment(function)
|
push(new FunctionExpressionJudgment(function)
|
||||||
..fileOffset = offsetForToken(beginToken));
|
..fileOffset = offsetForToken(beginToken));
|
||||||
|
@ -3542,8 +3547,9 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
case Assert.Expression:
|
case Assert.Expression:
|
||||||
// The parser has already reported an error indicating that assert
|
// The parser has already reported an error indicating that assert
|
||||||
// cannot be used in an expression.
|
// cannot be used in an expression.
|
||||||
push(deprecated_buildCompileTimeError(
|
push(buildCompileTimeErrorExpression(
|
||||||
"`assert` can't be used as an expression."));
|
fasta.messageAssertAsExpression, assertKeyword.offset,
|
||||||
|
length: assertKeyword.length));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Assert.Initializer:
|
case Assert.Initializer:
|
||||||
|
@ -3722,14 +3728,17 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
} else if (target == null ||
|
} else if (target == null ||
|
||||||
target is! JumpTarget ||
|
target is! JumpTarget ||
|
||||||
!target.isBreakTarget) {
|
!target.isBreakTarget) {
|
||||||
push(compileTimeErrorInLoopOrSwitch =
|
Token labelToken = breakKeyword.next;
|
||||||
deprecated_buildCompileTimeErrorStatement(
|
push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
|
||||||
"Can't break to '$name'.", breakKeyword.next.charOffset));
|
fasta.templateInvalidBreakTarget.withArguments(name),
|
||||||
|
labelToken.charOffset,
|
||||||
|
length: labelToken.length));
|
||||||
} else if (target.functionNestingLevel != functionNestingLevel) {
|
} else if (target.functionNestingLevel != functionNestingLevel) {
|
||||||
push(compileTimeErrorInLoopOrSwitch =
|
Token labelToken = breakKeyword.next;
|
||||||
deprecated_buildCompileTimeErrorStatement(
|
push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
|
||||||
"Can't break to '$name' in a different function.",
|
fasta.templateBreakTargetOutsideFunction.withArguments(name),
|
||||||
breakKeyword.next.charOffset));
|
labelToken.charOffset,
|
||||||
|
length: labelToken.length));
|
||||||
} else {
|
} else {
|
||||||
Statement statement =
|
Statement statement =
|
||||||
forest.breakStatement(breakKeyword, identifier, endToken);
|
forest.breakStatement(breakKeyword, identifier, endToken);
|
||||||
|
@ -3750,10 +3759,10 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
name = identifier.name;
|
name = identifier.name;
|
||||||
Declaration namedTarget = scope.lookupLabel(identifier.name);
|
Declaration namedTarget = scope.lookupLabel(identifier.name);
|
||||||
if (namedTarget != null && namedTarget is! JumpTarget) {
|
if (namedTarget != null && namedTarget is! JumpTarget) {
|
||||||
push(compileTimeErrorInLoopOrSwitch =
|
Token labelToken = continueKeyword.next;
|
||||||
deprecated_buildCompileTimeErrorStatement(
|
push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
|
||||||
"Target of continue must be a label.",
|
fasta.messageContinueLabelNotTarget, labelToken.charOffset,
|
||||||
continueKeyword.charOffset));
|
length: labelToken.length));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
target = namedTarget;
|
target = namedTarget;
|
||||||
|
@ -3778,18 +3787,21 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
push(compileTimeErrorInLoopOrSwitch =
|
push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
|
||||||
deprecated_buildCompileTimeErrorStatement(
|
fasta.messageContinueWithoutLabelInCase, continueKeyword.charOffset,
|
||||||
"No target of continue.", continueKeyword.charOffset));
|
length: continueKeyword.length));
|
||||||
} else if (!target.isContinueTarget) {
|
} else if (!target.isContinueTarget) {
|
||||||
push(compileTimeErrorInLoopOrSwitch =
|
Token labelToken = continueKeyword.next;
|
||||||
deprecated_buildCompileTimeErrorStatement(
|
push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
|
||||||
"Can't continue at '$name'.", continueKeyword.next.charOffset));
|
fasta.templateInvalidContinueTarget.withArguments(name),
|
||||||
|
labelToken.charOffset,
|
||||||
|
length: labelToken.length));
|
||||||
} else if (target.functionNestingLevel != functionNestingLevel) {
|
} else if (target.functionNestingLevel != functionNestingLevel) {
|
||||||
push(compileTimeErrorInLoopOrSwitch =
|
Token labelToken = continueKeyword.next;
|
||||||
deprecated_buildCompileTimeErrorStatement(
|
push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
|
||||||
"Can't continue at '$name' in a different function.",
|
fasta.templateContinueTargetOutsideFunction.withArguments(name),
|
||||||
continueKeyword.next.charOffset));
|
labelToken.charOffset,
|
||||||
|
length: labelToken.length));
|
||||||
} else {
|
} else {
|
||||||
Statement statement =
|
Statement statement =
|
||||||
forest.continueStatement(continueKeyword, identifier, endToken);
|
forest.continueStatement(continueKeyword, identifier, endToken);
|
||||||
|
@ -3941,14 +3953,6 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
push(new InvalidStatementJudgment(error, statement));
|
push(new InvalidStatementJudgment(error, statement));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Expression deprecated_buildCompileTimeError(String error,
|
|
||||||
[int charOffset = -1, fasta.Message message]) {
|
|
||||||
message ??= fasta.templateUnspecified.withArguments(error);
|
|
||||||
return new SyntheticExpressionJudgment(
|
|
||||||
buildCompileTimeError(message, charOffset, noLength));
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Expression buildCompileTimeError(Message message, int charOffset, int length,
|
Expression buildCompileTimeError(Message message, int charOffset, int length,
|
||||||
{List<LocatedMessage> context}) {
|
{List<LocatedMessage> context}) {
|
||||||
|
@ -3958,6 +3962,13 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
library.loader.buildCompileTimeError(message, charOffset, length, uri));
|
library.loader.buildCompileTimeError(message, charOffset, length, uri));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Expression buildCompileTimeErrorExpression(Message message, int offset,
|
||||||
|
{int length}) {
|
||||||
|
return new SyntheticExpressionJudgment(
|
||||||
|
buildCompileTimeError(message, offset, length ?? noLength));
|
||||||
|
}
|
||||||
|
|
||||||
Expression wrapInCompileTimeError(Expression expression, Message message,
|
Expression wrapInCompileTimeError(Expression expression, Message message,
|
||||||
{List<LocatedMessage> context}) {
|
{List<LocatedMessage> context}) {
|
||||||
return wrapInLocatedCompileTimeError(expression,
|
return wrapInLocatedCompileTimeError(expression,
|
||||||
|
@ -4041,17 +4052,11 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
], noLocation)));
|
], noLocation)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Statement deprecated_buildCompileTimeErrorStatement(error,
|
|
||||||
[int charOffset = -1, fasta.Message message]) {
|
|
||||||
return new ExpressionStatementJudgment(
|
|
||||||
deprecated_buildCompileTimeError(error, charOffset, message), null);
|
|
||||||
}
|
|
||||||
|
|
||||||
Statement buildCompileTimeErrorStatement(Message message, int charOffset,
|
Statement buildCompileTimeErrorStatement(Message message, int charOffset,
|
||||||
{List<LocatedMessage> context}) {
|
{List<LocatedMessage> context, int length}) {
|
||||||
return new ExpressionStatementJudgment(
|
return new ExpressionStatementJudgment(
|
||||||
new SyntheticExpressionJudgment(buildCompileTimeError(
|
new SyntheticExpressionJudgment(buildCompileTimeError(
|
||||||
message, charOffset, noLength,
|
message, charOffset, length ?? noLength,
|
||||||
context: context)),
|
context: context)),
|
||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
|
@ -4235,8 +4240,10 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
push(forest.block(
|
push(forest.block(
|
||||||
token,
|
token,
|
||||||
<Statement>[
|
<Statement>[
|
||||||
deprecated_buildCompileTimeErrorStatement(null, token.charOffset,
|
buildCompileTimeErrorStatement(
|
||||||
fasta.templateExpectedFunctionBody.withArguments(token))
|
fasta.templateExpectedFunctionBody.withArguments(token),
|
||||||
|
token.charOffset,
|
||||||
|
length: token.length)
|
||||||
],
|
],
|
||||||
null));
|
null));
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import '../fasta_codes.dart'
|
||||||
Template,
|
Template,
|
||||||
messageCantUsePrefixAsExpression,
|
messageCantUsePrefixAsExpression,
|
||||||
messageCantUsePrefixWithNullAware,
|
messageCantUsePrefixWithNullAware,
|
||||||
|
messageIllegalAssignmentToNonAssignable,
|
||||||
messageInvalidInitializer,
|
messageInvalidInitializer,
|
||||||
messageNotAConstantExpression,
|
messageNotAConstantExpression,
|
||||||
templateCantUseDeferredPrefixAsConstant,
|
templateCantUseDeferredPrefixAsConstant,
|
||||||
|
@ -930,9 +931,9 @@ abstract class ContextAwareGenerator implements Generator {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Expression makeInvalidWrite(Expression value) {
|
Expression makeInvalidWrite(Expression value) {
|
||||||
return helper.deprecated_buildCompileTimeError(
|
return helper.buildCompileTimeErrorExpression(
|
||||||
"Can't be used as left-hand side of assignment.",
|
messageIllegalAssignmentToNonAssignable, offsetForToken(token),
|
||||||
offsetForToken(token));
|
length: token?.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -962,8 +963,9 @@ abstract class DelayedAssignment implements ContextAwareGenerator {
|
||||||
|
|
||||||
Expression handleAssignment(bool voidContext) {
|
Expression handleAssignment(bool voidContext) {
|
||||||
if (helper.constantContext != ConstantContext.none) {
|
if (helper.constantContext != ConstantContext.none) {
|
||||||
return helper.deprecated_buildCompileTimeError(
|
return helper.buildCompileTimeErrorExpression(
|
||||||
null, offsetForToken(token), messageNotAConstantExpression);
|
messageNotAConstantExpression, offsetForToken(token),
|
||||||
|
length: token.length);
|
||||||
}
|
}
|
||||||
if (identical("=", assignmentOperator)) {
|
if (identical("=", assignmentOperator)) {
|
||||||
return generator.buildAssignment(value, voidContext: voidContext);
|
return generator.buildAssignment(value, voidContext: voidContext);
|
||||||
|
|
|
@ -75,14 +75,14 @@ abstract class ExpressionGeneratorHelper implements InferenceHelper {
|
||||||
Expression buildCompileTimeError(Message message, int charOffset, int length,
|
Expression buildCompileTimeError(Message message, int charOffset, int length,
|
||||||
{List<LocatedMessage> context});
|
{List<LocatedMessage> context});
|
||||||
|
|
||||||
|
Expression buildCompileTimeErrorExpression(Message message, int offset,
|
||||||
|
{int length});
|
||||||
|
|
||||||
Expression wrapInCompileTimeError(Expression expression, Message message);
|
Expression wrapInCompileTimeError(Expression expression, Message message);
|
||||||
|
|
||||||
Expression wrapInProblem(Expression expression, Message message, int length,
|
Expression wrapInProblem(Expression expression, Message message, int length,
|
||||||
{List<LocatedMessage> context});
|
{List<LocatedMessage> context});
|
||||||
|
|
||||||
Expression deprecated_buildCompileTimeError(String error,
|
|
||||||
[int offset, Message message]);
|
|
||||||
|
|
||||||
Initializer buildInvalidInitializer(Expression expression, [int offset]);
|
Initializer buildInvalidInitializer(Expression expression, [int offset]);
|
||||||
|
|
||||||
Initializer buildFieldInitializer(
|
Initializer buildFieldInitializer(
|
||||||
|
|
|
@ -13,8 +13,10 @@ import '../fasta_codes.dart'
|
||||||
show
|
show
|
||||||
Message,
|
Message,
|
||||||
LocatedMessage,
|
LocatedMessage,
|
||||||
|
messageCannotAssignToSuper,
|
||||||
messageLoadLibraryTakesNoArguments,
|
messageLoadLibraryTakesNoArguments,
|
||||||
messageNotAConstantExpression,
|
messageNotAConstantExpression,
|
||||||
|
messageNotAnLvalue,
|
||||||
messageCannotAssignToParenthesizedExpression,
|
messageCannotAssignToParenthesizedExpression,
|
||||||
templateNotConstantExpression,
|
templateNotConstantExpression,
|
||||||
messageSuperAsExpression,
|
messageSuperAsExpression,
|
||||||
|
|
|
@ -163,10 +163,10 @@ class ThisAccessGenerator extends KernelGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
Expression buildAssignmentError() {
|
Expression buildAssignmentError() {
|
||||||
String message =
|
return helper.buildCompileTimeError(
|
||||||
isSuper ? "Can't assign to 'super'." : "Can't assign to 'this'.";
|
isSuper ? messageCannotAssignToSuper : messageNotAnLvalue,
|
||||||
return helper.deprecated_buildCompileTimeError(
|
offsetForToken(token),
|
||||||
message, offsetForToken(token));
|
token.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -19,9 +19,11 @@ AssertExtraneousArgument/example: Fail
|
||||||
AsyncAsIdentifier/example: Fail
|
AsyncAsIdentifier/example: Fail
|
||||||
AwaitAsIdentifier/example: Fail
|
AwaitAsIdentifier/example: Fail
|
||||||
AwaitNotAsync/example: Fail
|
AwaitNotAsync/example: Fail
|
||||||
|
BreakTargetOutsideFunction/example: Fail
|
||||||
BuiltInIdentifierAsType/example: Fail
|
BuiltInIdentifierAsType/example: Fail
|
||||||
BuiltInIdentifierInDeclaration/example: Fail
|
BuiltInIdentifierInDeclaration/example: Fail
|
||||||
CannotAssignToParenthesizedExpression/example: Fail
|
CannotAssignToParenthesizedExpression/example: Fail
|
||||||
|
CannotAssignToSuper/example: Fail
|
||||||
CannotReadPackagesFile/analyzerCode: Fail
|
CannotReadPackagesFile/analyzerCode: Fail
|
||||||
CannotReadPackagesFile/example: Fail
|
CannotReadPackagesFile/example: Fail
|
||||||
CannotReadSdkSpecification/analyzerCode: Fail
|
CannotReadSdkSpecification/analyzerCode: Fail
|
||||||
|
@ -80,7 +82,9 @@ ConstEvalZeroDivisor/example: Fail
|
||||||
ConstFieldWithoutInitializer/example: Fail
|
ConstFieldWithoutInitializer/example: Fail
|
||||||
ConstructorNotFound/example: Fail
|
ConstructorNotFound/example: Fail
|
||||||
ConstructorNotSync/example: Fail
|
ConstructorNotSync/example: Fail
|
||||||
|
ContinueLabelNotTarget/example: Fail
|
||||||
ContinueOutsideOfLoop/script1: Fail
|
ContinueOutsideOfLoop/script1: Fail
|
||||||
|
ContinueTargetOutsideFunction/example: Fail
|
||||||
ContinueWithoutLabelInCase/script1: Fail
|
ContinueWithoutLabelInCase/script1: Fail
|
||||||
CouldNotParseUri/analyzerCode: Fail
|
CouldNotParseUri/analyzerCode: Fail
|
||||||
CouldNotParseUri/example: Fail
|
CouldNotParseUri/example: Fail
|
||||||
|
@ -111,6 +115,7 @@ DuplicatedNamedArgument/example: Fail
|
||||||
DuplicatedParameterName/example: Fail
|
DuplicatedParameterName/example: Fail
|
||||||
Encoding/analyzerCode: Fail
|
Encoding/analyzerCode: Fail
|
||||||
EnumConstantSameNameAsEnclosing/example: Fail
|
EnumConstantSameNameAsEnclosing/example: Fail
|
||||||
|
EnumInstantiation/example: Fail
|
||||||
EqualityCannotBeEqualityOperand/script1: Fail
|
EqualityCannotBeEqualityOperand/script1: Fail
|
||||||
EqualityCannotBeEqualityOperand/script2: Fail
|
EqualityCannotBeEqualityOperand/script2: Fail
|
||||||
ExpectedAnInitializer/script1: Fail
|
ExpectedAnInitializer/script1: Fail
|
||||||
|
@ -122,6 +127,7 @@ ExpectedClassBody/example: Fail
|
||||||
ExpectedClassMember/example: Fail
|
ExpectedClassMember/example: Fail
|
||||||
ExpectedDeclaration/example: Fail
|
ExpectedDeclaration/example: Fail
|
||||||
ExpectedFunctionBody/example: Fail
|
ExpectedFunctionBody/example: Fail
|
||||||
|
ExpectedNamedArgument/example: Fail
|
||||||
ExpectedOneExpression/analyzerCode: Fail
|
ExpectedOneExpression/analyzerCode: Fail
|
||||||
ExpectedOneExpression/example: Fail
|
ExpectedOneExpression/example: Fail
|
||||||
ExpectedOpenParens/analyzerCode: Fail
|
ExpectedOpenParens/analyzerCode: Fail
|
||||||
|
@ -196,6 +202,8 @@ InputFileNotFound/analyzerCode: Fail
|
||||||
InputFileNotFound/example: Fail
|
InputFileNotFound/example: Fail
|
||||||
IntegerLiteralIsOutOfRange/example: Fail
|
IntegerLiteralIsOutOfRange/example: Fail
|
||||||
InterpolationInUri/example: Fail
|
InterpolationInUri/example: Fail
|
||||||
|
InvalidBreakTarget/analyzerCode: Fail
|
||||||
|
InvalidBreakTarget/example: Fail
|
||||||
InvalidCastFunctionExpr/example: Fail
|
InvalidCastFunctionExpr/example: Fail
|
||||||
InvalidCastLiteralList/example: Fail
|
InvalidCastLiteralList/example: Fail
|
||||||
InvalidCastLiteralMap/example: Fail
|
InvalidCastLiteralMap/example: Fail
|
||||||
|
@ -204,6 +212,8 @@ InvalidCastNewExpr/example: Fail
|
||||||
InvalidCastStaticMethod/example: Fail
|
InvalidCastStaticMethod/example: Fail
|
||||||
InvalidCastTopLevelFunction/example: Fail
|
InvalidCastTopLevelFunction/example: Fail
|
||||||
InvalidCatchArguments/example: Fail
|
InvalidCatchArguments/example: Fail
|
||||||
|
InvalidContinueTarget/analyzerCode: Fail
|
||||||
|
InvalidContinueTarget/example: Fail
|
||||||
InvalidInitializer/example: Fail
|
InvalidInitializer/example: Fail
|
||||||
InvalidInlineFunctionType/analyzerCode: Fail
|
InvalidInlineFunctionType/analyzerCode: Fail
|
||||||
InvalidPackageUri/analyzerCode: Fail
|
InvalidPackageUri/analyzerCode: Fail
|
||||||
|
@ -221,6 +231,8 @@ MemberWithSameNameAsClass/example: Fail
|
||||||
MetadataTypeArguments/example: Fail
|
MetadataTypeArguments/example: Fail
|
||||||
MethodNotFound/dart2jsCode: Fail
|
MethodNotFound/dart2jsCode: Fail
|
||||||
MethodNotFound/example: Fail
|
MethodNotFound/example: Fail
|
||||||
|
MissingArgumentList/analyzerCode: Fail
|
||||||
|
MissingArgumentList/example: Fail
|
||||||
MissingAssignableSelector/script1: Fail
|
MissingAssignableSelector/script1: Fail
|
||||||
MissingAssignmentInInitializer/script1: Fail
|
MissingAssignmentInInitializer/script1: Fail
|
||||||
MissingInput/analyzerCode: Fail
|
MissingInput/analyzerCode: Fail
|
||||||
|
|
|
@ -745,6 +745,15 @@ BreakOutsideOfLoop:
|
||||||
script:
|
script:
|
||||||
- "main() { break; }"
|
- "main() { break; }"
|
||||||
|
|
||||||
|
InvalidBreakTarget:
|
||||||
|
template: "Can't break to '#name'."
|
||||||
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
|
BreakTargetOutsideFunction:
|
||||||
|
template: "Can't break to '#name' in a different function."
|
||||||
|
analyzerCode: LABEL_IN_OUTER_SCOPE
|
||||||
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
ContinueOutsideOfLoop:
|
ContinueOutsideOfLoop:
|
||||||
template: "A continue statement can't be used outside of a loop or switch statement."
|
template: "A continue statement can't be used outside of a loop or switch statement."
|
||||||
tip: "Try removing the continue statement."
|
tip: "Try removing the continue statement."
|
||||||
|
@ -753,6 +762,20 @@ ContinueOutsideOfLoop:
|
||||||
script:
|
script:
|
||||||
- "main() { continue; }"
|
- "main() { continue; }"
|
||||||
|
|
||||||
|
InvalidContinueTarget:
|
||||||
|
template: "Can't continue at '#name'."
|
||||||
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
|
ContinueTargetOutsideFunction:
|
||||||
|
template: "Can't continue at '#name' in a different function."
|
||||||
|
analyzerCode: LABEL_IN_OUTER_SCOPE
|
||||||
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
|
ContinueLabelNotTarget:
|
||||||
|
template: "Target of continue must be a label."
|
||||||
|
analyzerCode: LABEL_UNDEFINED
|
||||||
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
ContinueWithoutLabelInCase:
|
ContinueWithoutLabelInCase:
|
||||||
template: "A continue statement in a switch statement must have a label as a target."
|
template: "A continue statement in a switch statement must have a label as a target."
|
||||||
tip: "Try adding a label associated with one of the case clauses to the continue statement."
|
tip: "Try adding a label associated with one of the case clauses to the continue statement."
|
||||||
|
@ -1087,6 +1110,11 @@ PositionalAfterNamedArgument:
|
||||||
analyzerCode: POSITIONAL_AFTER_NAMED_ARGUMENT
|
analyzerCode: POSITIONAL_AFTER_NAMED_ARGUMENT
|
||||||
dart2jsCode: "*ignored*"
|
dart2jsCode: "*ignored*"
|
||||||
|
|
||||||
|
ExpectedNamedArgument:
|
||||||
|
template: "Expected named argument."
|
||||||
|
analyzerCode: EXTRA_POSITIONAL_ARGUMENTS
|
||||||
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
AssertAsExpression:
|
AssertAsExpression:
|
||||||
template: "`assert` can't be used as an expression."
|
template: "`assert` can't be used as an expression."
|
||||||
dart2jsCode: "*fatal*"
|
dart2jsCode: "*fatal*"
|
||||||
|
@ -1253,6 +1281,10 @@ CandidateFoundIsDefaultConstructor:
|
||||||
template: "The class '#name' has a constructor that takes no arguments."
|
template: "The class '#name' has a constructor that takes no arguments."
|
||||||
severity: CONTEXT
|
severity: CONTEXT
|
||||||
|
|
||||||
|
MissingArgumentList:
|
||||||
|
template: "Constructor invocations must have an argument list."
|
||||||
|
severity: ERROR
|
||||||
|
|
||||||
TooFewArguments:
|
TooFewArguments:
|
||||||
template: "Too few positional arguments: #count required, #count2 given."
|
template: "Too few positional arguments: #count required, #count2 given."
|
||||||
severity: ERROR_LEGACY_WARNING
|
severity: ERROR_LEGACY_WARNING
|
||||||
|
@ -1277,6 +1309,12 @@ AbstractClassInstantiation:
|
||||||
analyzerCode: NEW_WITH_ABSTRACT_CLASS
|
analyzerCode: NEW_WITH_ABSTRACT_CLASS
|
||||||
dart2jsCode: "*fatal*"
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
|
EnumInstantiation:
|
||||||
|
template: "Enums can't be instantiated."
|
||||||
|
severity: ERROR
|
||||||
|
analyzerCode: INSTANTIATE_ENUM
|
||||||
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
AbstractRedirectedClassInstantiation:
|
AbstractRedirectedClassInstantiation:
|
||||||
template: "Factory redirects to class '#name', which is abstract and can't be instantiated."
|
template: "Factory redirects to class '#name', which is abstract and can't be instantiated."
|
||||||
severity: ERROR_LEGACY_WARNING
|
severity: ERROR_LEGACY_WARNING
|
||||||
|
@ -2310,6 +2348,11 @@ NotAnLvalue:
|
||||||
analyzerCode: NOT_AN_LVALUE
|
analyzerCode: NOT_AN_LVALUE
|
||||||
dart2jsCode: "*fatal*"
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
|
CannotAssignToSuper:
|
||||||
|
template: "Can't assign to super."
|
||||||
|
analyzerCode: NOT_AN_LVALUE
|
||||||
|
dart2jsCode: "*fatal*"
|
||||||
|
|
||||||
IllegalAssignmentToNonAssignable:
|
IllegalAssignmentToNonAssignable:
|
||||||
template: "Illegal assignment to non-assignable expression."
|
template: "Illegal assignment to non-assignable expression."
|
||||||
analyzerCode: ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
|
analyzerCode: ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
|
||||||
|
@ -2634,7 +2677,7 @@ BoundIssueViaRawTypeWithNonSimpleBounds:
|
||||||
template: "Generic type '#name' can't be used without type arguments in a type variable bound."
|
template: "Generic type '#name' can't be used without type arguments in a type variable bound."
|
||||||
tip: "Try providing type arguments to '#name' here."
|
tip: "Try providing type arguments to '#name' here."
|
||||||
severity: ERROR
|
severity: ERROR
|
||||||
analyzerCode: SNOT_INSTANTIATED_BOUND
|
analyzerCode: NOT_INSTANTIATED_BOUND
|
||||||
dart2jsCode: "*fatal*"
|
dart2jsCode: "*fatal*"
|
||||||
script: >
|
script: >
|
||||||
class Hest<X extends Hest<X>> {}
|
class Hest<X extends Hest<X>> {}
|
||||||
|
|
Loading…
Reference in a new issue