mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[cfe] Report error on covariant in extension type methods
Closes #53324 Change-Id: Iff86c4eb7c141f27c64de29459390ac395e1c4ee Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341487 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Paul Berry <paulberry@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
9bb61c0da6
commit
8ca0aa23ea
|
@ -4726,6 +4726,60 @@ Message _withArgumentsExtraneousModifierInExtension(Token token) {
|
|||
arguments: {'lexeme': token});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<Message Function(Token token)>
|
||||
templateExtraneousModifierInExtensionType =
|
||||
const Template<Message Function(Token token)>(
|
||||
"ExtraneousModifierInExtensionType",
|
||||
problemMessageTemplate:
|
||||
r"""Can't have modifier '#lexeme' in an extension type.""",
|
||||
correctionMessageTemplate: r"""Try removing '#lexeme'.""",
|
||||
withArguments: _withArgumentsExtraneousModifierInExtensionType);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Message Function(Token token)>
|
||||
codeExtraneousModifierInExtensionType =
|
||||
const Code<Message Function(Token token)>(
|
||||
"ExtraneousModifierInExtensionType",
|
||||
index: 174);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsExtraneousModifierInExtensionType(Token token) {
|
||||
String lexeme = token.lexeme;
|
||||
return new Message(codeExtraneousModifierInExtensionType,
|
||||
problemMessage:
|
||||
"""Can't have modifier '${lexeme}' in an extension type.""",
|
||||
correctionMessage: """Try removing '${lexeme}'.""",
|
||||
arguments: {'lexeme': token});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<Message Function(Token token)>
|
||||
templateExtraneousModifierInPrimaryConstructor =
|
||||
const Template<Message Function(Token token)>(
|
||||
"ExtraneousModifierInPrimaryConstructor",
|
||||
problemMessageTemplate:
|
||||
r"""Can't have modifier '#lexeme' in a primary constructor.""",
|
||||
correctionMessageTemplate: r"""Try removing '#lexeme'.""",
|
||||
withArguments: _withArgumentsExtraneousModifierInPrimaryConstructor);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Message Function(Token token)>
|
||||
codeExtraneousModifierInPrimaryConstructor =
|
||||
const Code<Message Function(Token token)>(
|
||||
"ExtraneousModifierInPrimaryConstructor",
|
||||
index: 175);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsExtraneousModifierInPrimaryConstructor(Token token) {
|
||||
String lexeme = token.lexeme;
|
||||
return new Message(codeExtraneousModifierInPrimaryConstructor,
|
||||
problemMessage:
|
||||
"""Can't have modifier '${lexeme}' in a primary constructor.""",
|
||||
correctionMessage: """Try removing '${lexeme}'.""",
|
||||
arguments: {'lexeme': token});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codeFactoryNotSync = messageFactoryNotSync;
|
||||
|
||||
|
|
|
@ -38,6 +38,13 @@ enum MemberKind {
|
|||
/// A static method in an extension.
|
||||
ExtensionStaticMethod,
|
||||
|
||||
/// A non-static method or constructor in an extension type.
|
||||
// TODO(johnniwinther): Can we separate constructors from instance methods?
|
||||
ExtensionTypeNonStaticMethod,
|
||||
|
||||
/// A static method in an extension type.
|
||||
ExtensionTypeStaticMethod,
|
||||
|
||||
/// An instance field in a class.
|
||||
NonStaticField,
|
||||
|
||||
|
|
|
@ -197,12 +197,28 @@ class ModifierContext {
|
|||
if (parameterKind != FormalParameterKind.optionalNamed) {
|
||||
reportExtraneousModifier(requiredToken);
|
||||
}
|
||||
if (memberKind == MemberKind.StaticMethod ||
|
||||
memberKind == MemberKind.TopLevelMethod) {
|
||||
reportExtraneousModifier(this.covariantToken);
|
||||
} else if (memberKind == MemberKind.ExtensionNonStaticMethod ||
|
||||
memberKind == MemberKind.ExtensionStaticMethod) {
|
||||
reportExtraneousModifierInExtension(this.covariantToken);
|
||||
switch (memberKind) {
|
||||
case MemberKind.StaticMethod:
|
||||
case MemberKind.TopLevelMethod:
|
||||
reportExtraneousModifier(this.covariantToken);
|
||||
case MemberKind.ExtensionNonStaticMethod:
|
||||
case MemberKind.ExtensionStaticMethod:
|
||||
reportExtraneousModifierInExtension(this.covariantToken);
|
||||
case MemberKind.ExtensionTypeNonStaticMethod:
|
||||
case MemberKind.ExtensionTypeStaticMethod:
|
||||
reportExtraneousModifierInExtensionType(this.covariantToken);
|
||||
case MemberKind.PrimaryConstructor:
|
||||
reportExtraneousModifierInPrimaryConstructor(this.covariantToken);
|
||||
case MemberKind.Catch:
|
||||
case MemberKind.Factory:
|
||||
case MemberKind.FunctionTypeAlias:
|
||||
case MemberKind.FunctionTypedParameter:
|
||||
case MemberKind.GeneralizedFunctionType:
|
||||
case MemberKind.Local:
|
||||
case MemberKind.NonStaticMethod:
|
||||
case MemberKind.NonStaticField:
|
||||
case MemberKind.StaticField:
|
||||
case MemberKind.TopLevelField:
|
||||
}
|
||||
if (constToken != null) {
|
||||
reportExtraneousModifier(constToken);
|
||||
|
@ -626,6 +642,20 @@ class ModifierContext {
|
|||
}
|
||||
}
|
||||
|
||||
void reportExtraneousModifierInExtensionType(Token? modifier) {
|
||||
if (modifier != null) {
|
||||
parser.reportRecoverableErrorWithToken(
|
||||
modifier, codes.templateExtraneousModifierInExtensionType);
|
||||
}
|
||||
}
|
||||
|
||||
void reportExtraneousModifierInPrimaryConstructor(Token? modifier) {
|
||||
if (modifier != null) {
|
||||
parser.reportRecoverableErrorWithToken(
|
||||
modifier, codes.templateExtraneousModifierInPrimaryConstructor);
|
||||
}
|
||||
}
|
||||
|
||||
void reportModifierOutOfOrder(Token modifier, String beforeModifier) {
|
||||
parser.reportRecoverableError(
|
||||
modifier,
|
||||
|
|
|
@ -1826,13 +1826,28 @@ class Parser {
|
|||
/// Return the message that should be produced when the formal parameters are
|
||||
/// missing.
|
||||
codes.Message missingParameterMessage(MemberKind kind) {
|
||||
if (kind == MemberKind.FunctionTypeAlias) {
|
||||
return codes.messageMissingTypedefParameters;
|
||||
} else if (kind == MemberKind.NonStaticMethod ||
|
||||
kind == MemberKind.StaticMethod) {
|
||||
return codes.messageMissingMethodParameters;
|
||||
switch (kind) {
|
||||
case MemberKind.FunctionTypeAlias:
|
||||
return codes.messageMissingTypedefParameters;
|
||||
case MemberKind.StaticMethod:
|
||||
case MemberKind.NonStaticMethod:
|
||||
return codes.messageMissingMethodParameters;
|
||||
case MemberKind.TopLevelMethod:
|
||||
case MemberKind.ExtensionNonStaticMethod:
|
||||
case MemberKind.ExtensionStaticMethod:
|
||||
case MemberKind.ExtensionTypeNonStaticMethod:
|
||||
case MemberKind.ExtensionTypeStaticMethod:
|
||||
case MemberKind.Catch:
|
||||
case MemberKind.Factory:
|
||||
case MemberKind.FunctionTypedParameter:
|
||||
case MemberKind.GeneralizedFunctionType:
|
||||
case MemberKind.Local:
|
||||
case MemberKind.NonStaticField:
|
||||
case MemberKind.StaticField:
|
||||
case MemberKind.TopLevelField:
|
||||
case MemberKind.PrimaryConstructor:
|
||||
return codes.messageMissingFunctionParameters;
|
||||
}
|
||||
return codes.messageMissingFunctionParameters;
|
||||
}
|
||||
|
||||
/// Check if [token] is the usage of 'required' in a formal parameter in a
|
||||
|
@ -1923,12 +1938,29 @@ class Parser {
|
|||
|
||||
if (isModifier(next)) {
|
||||
if (optional('covariant', next)) {
|
||||
if (memberKind != MemberKind.StaticMethod &&
|
||||
memberKind != MemberKind.TopLevelMethod &&
|
||||
memberKind != MemberKind.ExtensionNonStaticMethod &&
|
||||
memberKind != MemberKind.ExtensionStaticMethod) {
|
||||
covariantToken = token = next;
|
||||
next = token.next!;
|
||||
switch (memberKind) {
|
||||
case MemberKind.StaticMethod:
|
||||
case MemberKind.TopLevelMethod:
|
||||
case MemberKind.ExtensionNonStaticMethod:
|
||||
case MemberKind.ExtensionStaticMethod:
|
||||
case MemberKind.ExtensionTypeNonStaticMethod:
|
||||
case MemberKind.ExtensionTypeStaticMethod:
|
||||
case MemberKind.PrimaryConstructor:
|
||||
// Error cases reported in
|
||||
// [ModifierContext.parseFormalParameterModifiers].
|
||||
break;
|
||||
case MemberKind.Catch:
|
||||
case MemberKind.Factory:
|
||||
case MemberKind.FunctionTypeAlias:
|
||||
case MemberKind.FunctionTypedParameter:
|
||||
case MemberKind.GeneralizedFunctionType:
|
||||
case MemberKind.Local:
|
||||
case MemberKind.NonStaticMethod:
|
||||
case MemberKind.NonStaticField:
|
||||
case MemberKind.StaticField:
|
||||
case MemberKind.TopLevelField:
|
||||
covariantToken = token = next;
|
||||
next = token.next!;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4846,19 +4878,28 @@ class Parser {
|
|||
// that a constructor. We issue an error about the name below.
|
||||
}
|
||||
}
|
||||
MemberKind memberKind;
|
||||
switch (kind) {
|
||||
case DeclarationKind.TopLevel:
|
||||
case DeclarationKind.Class:
|
||||
case DeclarationKind.Mixin:
|
||||
case DeclarationKind.Enum:
|
||||
memberKind = staticToken != null
|
||||
? MemberKind.StaticMethod
|
||||
: MemberKind.NonStaticMethod;
|
||||
case DeclarationKind.Extension:
|
||||
memberKind = staticToken != null
|
||||
? MemberKind.ExtensionStaticMethod
|
||||
: MemberKind.ExtensionNonStaticMethod;
|
||||
case DeclarationKind.ExtensionType:
|
||||
memberKind = staticToken != null
|
||||
? MemberKind.ExtensionTypeStaticMethod
|
||||
: MemberKind.ExtensionTypeNonStaticMethod;
|
||||
}
|
||||
|
||||
Token beforeParam = token;
|
||||
Token? beforeInitializers = parseGetterOrFormalParameters(
|
||||
token,
|
||||
name,
|
||||
isConsideredGetter,
|
||||
kind == DeclarationKind.Extension
|
||||
? staticToken != null
|
||||
? MemberKind.ExtensionStaticMethod
|
||||
: MemberKind.ExtensionNonStaticMethod
|
||||
: staticToken != null
|
||||
? MemberKind.StaticMethod
|
||||
: MemberKind.NonStaticMethod);
|
||||
token, name, isConsideredGetter, memberKind);
|
||||
token = parseInitializersOpt(beforeInitializers);
|
||||
if (token == beforeInitializers) beforeInitializers = null;
|
||||
|
||||
|
|
|
@ -2834,6 +2834,10 @@ ParserErrorCode.EXTRANEOUS_MODIFIER:
|
|||
status: needsFix
|
||||
notes: |-
|
||||
Remove the extraneous keyword.
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE:
|
||||
status: needsEvaluation
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR:
|
||||
status: needsEvaluation
|
||||
ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION:
|
||||
status: needsFix
|
||||
notes: |-
|
||||
|
|
|
@ -195,6 +195,8 @@ final fastaAnalyzerErrorCodes = <ErrorCode?>[
|
|||
ParserErrorCode.EXPECTED_SWITCH_EXPRESSION_BODY,
|
||||
ParserErrorCode.EXPECTED_SWITCH_STATEMENT_BODY,
|
||||
ParserErrorCode.EXPECTED_EXTENSION_BODY,
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE,
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR,
|
||||
];
|
||||
|
||||
class ParserErrorCode extends ErrorCode {
|
||||
|
@ -881,6 +883,20 @@ class ParserErrorCode extends ErrorCode {
|
|||
correctionMessage: "Try removing '{0}'.",
|
||||
);
|
||||
|
||||
static const ParserErrorCode EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE =
|
||||
ParserErrorCode(
|
||||
'EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE',
|
||||
"Can't have modifier '{0}' in an extension type.",
|
||||
correctionMessage: "Try removing '{0}'.",
|
||||
);
|
||||
|
||||
static const ParserErrorCode EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR =
|
||||
ParserErrorCode(
|
||||
'EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR',
|
||||
"Can't have modifier '{0}' in a primary constructor.",
|
||||
correctionMessage: "Try removing '{0}'.",
|
||||
);
|
||||
|
||||
static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = ParserErrorCode(
|
||||
'FACTORY_TOP_LEVEL_DECLARATION',
|
||||
"Top-level declarations can't be declared to be 'factory'.",
|
||||
|
|
|
@ -742,6 +742,8 @@ const List<ErrorCode> errorCodeValues = [
|
|||
ParserErrorCode.EXTERNAL_SETTER_WITH_BODY,
|
||||
ParserErrorCode.EXTERNAL_TYPEDEF,
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER,
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE,
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR,
|
||||
ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION,
|
||||
ParserErrorCode.FACTORY_WITHOUT_BODY,
|
||||
ParserErrorCode.FACTORY_WITH_INITIALIZERS,
|
||||
|
|
|
@ -1801,16 +1801,7 @@ class AstBuilder extends StackListener {
|
|||
startToken: requiredKeyword,
|
||||
);
|
||||
}
|
||||
// TODO(scheglov): https://github.com/dart-lang/sdk/issues/53324
|
||||
// If the issue fixed, we can remove this from the analyzer.
|
||||
if (_classLikeBuilder is _ExtensionTypeDeclarationBuilder &&
|
||||
covariantKeyword != null) {
|
||||
errorReporter.errorReporter?.reportErrorForToken(
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER,
|
||||
covariantKeyword,
|
||||
[covariantKeyword.lexeme],
|
||||
);
|
||||
}
|
||||
|
||||
var metadata = pop() as List<AnnotationImpl>?;
|
||||
var comment = _findComment(metadata,
|
||||
thisKeyword ?? typeOrFunctionTypedParameter?.beginToken ?? nameToken);
|
||||
|
|
|
@ -45,7 +45,7 @@ ExtensionTypeDeclaration
|
|||
extension type A(covariant int it) {}
|
||||
''');
|
||||
parseResult.assertErrors([
|
||||
error(ParserErrorCode.EXTRANEOUS_MODIFIER, 17, 9),
|
||||
error(ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR, 17, 9),
|
||||
]);
|
||||
|
||||
final node = parseResult.findNode.singleExtensionTypeDeclaration;
|
||||
|
@ -70,7 +70,7 @@ ExtensionTypeDeclaration
|
|||
extension type A(covariant final int it) {}
|
||||
''');
|
||||
parseResult.assertErrors([
|
||||
error(ParserErrorCode.EXTRANEOUS_MODIFIER, 17, 9),
|
||||
error(ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR, 17, 9),
|
||||
error(ParserErrorCode.REPRESENTATION_FIELD_MODIFIER, 27, 5),
|
||||
]);
|
||||
|
||||
|
@ -173,7 +173,7 @@ extension type A(int it) {
|
|||
}
|
||||
''');
|
||||
parseResult.assertErrors([
|
||||
error(ParserErrorCode.EXTRANEOUS_MODIFIER, 38, 9),
|
||||
error(ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE, 38, 9),
|
||||
]);
|
||||
|
||||
final node = parseResult.findNode.singleExtensionTypeDeclaration;
|
||||
|
@ -217,7 +217,7 @@ extension type A(int it) {
|
|||
}
|
||||
''');
|
||||
parseResult.assertErrors([
|
||||
error(ParserErrorCode.EXTRANEOUS_MODIFIER, 45, 9),
|
||||
error(ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE, 45, 9),
|
||||
]);
|
||||
|
||||
final node = parseResult.findNode.singleExtensionTypeDeclaration;
|
||||
|
|
|
@ -150,4 +150,9 @@ class Modifier {
|
|||
static int removeRequiredMask(int mask) {
|
||||
return mask & ~requiredMask;
|
||||
}
|
||||
|
||||
/// Sets the bit in [mask] corresponding to [covariantMask] to 0.
|
||||
static int removeCovariantMask(int mask) {
|
||||
return mask & ~covariantMask;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -776,13 +776,12 @@ class DietListener extends StackListenerImpl {
|
|||
// constructor body. An error is reported by the parser but we skip
|
||||
// the body here to avoid overwriting the already lowering const
|
||||
// constructor.
|
||||
// TODO(johnniwinther): Pass [memberKind] from the caller.
|
||||
MemberKind memberKind = builder.isStatic
|
||||
? MemberKind.StaticMethod
|
||||
: MemberKind.NonStaticMethod;
|
||||
buildFunctionBody(
|
||||
createFunctionListener(builder),
|
||||
beginParam,
|
||||
metadata,
|
||||
builder.isStatic
|
||||
? MemberKind.StaticMethod
|
||||
: MemberKind.NonStaticMethod);
|
||||
createFunctionListener(builder), beginParam, metadata, memberKind);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1635,10 +1635,14 @@ class OutlineBuilder extends StackListenerImpl {
|
|||
if (inExtensionType && formal.type is ImplicitTypeBuilder) {
|
||||
libraryBuilder.addProblem(messageExpectedRepresentationType,
|
||||
formal.charOffset, formal.name.length, formal.fileUri);
|
||||
formal.type =
|
||||
new InvalidTypeBuilderImpl(formal.fileUri, formal.charOffset);
|
||||
}
|
||||
if (inExtensionType &&
|
||||
Modifier.maskContainsActualModifiers(
|
||||
Modifier.removeRequiredMask(formal.modifiers))) {
|
||||
if (inExtensionType && Modifier.maskContainsActualModifiers(
|
||||
// 'covariant' is reported in the parser.
|
||||
Modifier.removeCovariantMask(
|
||||
// 'required' is reported in the parser.
|
||||
Modifier.removeRequiredMask(formal.modifiers)))) {
|
||||
libraryBuilder.addProblem(messageRepresentationFieldModifier,
|
||||
formal.charOffset, formal.name.length, formal.fileUri);
|
||||
}
|
||||
|
@ -4169,9 +4173,11 @@ extension on MemberKind {
|
|||
case MemberKind.TopLevelMethod:
|
||||
case MemberKind.ExtensionNonStaticMethod:
|
||||
case MemberKind.ExtensionStaticMethod:
|
||||
case MemberKind.ExtensionTypeStaticMethod:
|
||||
case MemberKind.PrimaryConstructor:
|
||||
return false;
|
||||
case MemberKind.NonStaticMethod:
|
||||
case MemberKind.ExtensionTypeNonStaticMethod:
|
||||
// These can be inferred but cannot hold parameters so the cases are
|
||||
// dead code:
|
||||
case MemberKind.NonStaticField:
|
||||
|
|
|
@ -1412,6 +1412,22 @@ ExtraneousModifierInExtension:
|
|||
script:
|
||||
- "extension on String { foo(covariant String child) {} }"
|
||||
|
||||
ExtraneousModifierInExtensionType:
|
||||
index: 174
|
||||
problemMessage: "Can't have modifier '#lexeme' in an extension type."
|
||||
correctionMessage: "Try removing '#lexeme'."
|
||||
analyzerCode: ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE
|
||||
script:
|
||||
- "extension type ET(String i) { foo(covariant String child) {} }"
|
||||
|
||||
ExtraneousModifierInPrimaryConstructor:
|
||||
index: 175
|
||||
problemMessage: "Can't have modifier '#lexeme' in a primary constructor."
|
||||
correctionMessage: "Try removing '#lexeme'."
|
||||
analyzerCode: ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR
|
||||
script:
|
||||
- "extension type ET(covariant String i) { }"
|
||||
|
||||
FinalAndCovariant:
|
||||
index: 80
|
||||
problemMessage: "Members can't be declared to be both 'final' and 'covariant'."
|
||||
|
|
|
@ -46,8 +46,8 @@ beginCompilationUnit(class)
|
|||
handleNoType({)
|
||||
handleIdentifier(method, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
beginBlockFunctionBody({)
|
||||
|
|
|
@ -76,11 +76,11 @@ parseUnit(class)
|
|||
parseQualifiedRestOpt(method, methodDeclarationContinuation)
|
||||
parseMethodTypeVar(method)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(method, method, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(method, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(method, method, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(method, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
|
|
@ -119,15 +119,15 @@ beginCompilationUnit(extension)
|
|||
handleIdentifier(constructor, methodDeclarationContinuation)
|
||||
handleQualified(.)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(this)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(this, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(this, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleNoType(()
|
||||
handleIdentifier(it, fieldInitializer)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(this, null, ., it, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(this, null, ., it, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleEmptyFunctionBody(;)
|
||||
|
@ -142,17 +142,17 @@ beginCompilationUnit(extension)
|
|||
handleIdentifier(redirect, methodDeclarationContinuation)
|
||||
handleQualified(.)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(it)
|
||||
handleType(int, null)
|
||||
handleIdentifier(it, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, it, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, it, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginInitializers(:)
|
||||
beginInitializer(this)
|
||||
handleThisExpression(this, expression)
|
||||
|
@ -254,7 +254,7 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleIdentifier(getter, methodDeclaration)
|
||||
handleNoTypeVariables(=>)
|
||||
handleNoFormalParameters(=>, MemberKind.NonStaticMethod)
|
||||
handleNoFormalParameters(=>, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleIdentifier(it, expression)
|
||||
|
@ -271,17 +271,17 @@ beginCompilationUnit(extension)
|
|||
handleVoidKeyword(void)
|
||||
handleIdentifier(setter, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(value)
|
||||
handleType(int, null)
|
||||
handleIdentifier(value, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
beginBlockFunctionBody({)
|
||||
|
@ -297,8 +297,8 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleIdentifier(method, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleIdentifier(it, expression)
|
||||
|
@ -317,17 +317,17 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleOperatorName(operator, [])
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(index)
|
||||
handleType(int, null)
|
||||
handleIdentifier(index, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleIdentifier(it, expression)
|
||||
|
@ -344,26 +344,26 @@ beginCompilationUnit(extension)
|
|||
handleVoidKeyword(void)
|
||||
handleOperatorName(operator, []=)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(index)
|
||||
handleType(int, null)
|
||||
handleIdentifier(index, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue(,)
|
||||
endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(value)
|
||||
handleType(int, null)
|
||||
handleIdentifier(value, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(2, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
beginBlockFunctionBody({)
|
||||
|
@ -392,7 +392,7 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleIdentifier(staticGetter, methodDeclaration)
|
||||
handleNoTypeVariables(=>)
|
||||
handleNoFormalParameters(=>, MemberKind.StaticMethod)
|
||||
handleNoFormalParameters(=>, MemberKind.ExtensionTypeStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleLiteralInt(42)
|
||||
|
@ -406,17 +406,17 @@ beginCompilationUnit(extension)
|
|||
handleVoidKeyword(void)
|
||||
handleIdentifier(staticSetter, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.StaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.StaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(value)
|
||||
handleType(int, null)
|
||||
handleIdentifier(value, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.StaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.StaticMethod)
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
beginBlockFunctionBody({)
|
||||
|
@ -432,8 +432,8 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleIdentifier(staticMethod, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.StaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.StaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeStaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.ExtensionTypeStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleLiteralInt(42)
|
||||
|
|
|
@ -179,21 +179,21 @@ parseUnit(extension)
|
|||
listener: handleQualified(.)
|
||||
parseMethodTypeVar(constructor)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(constructor, ExtensionType4, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(constructor, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(constructor, ExtensionType4, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(constructor, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(this)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(this, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(this, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleNoType(()
|
||||
ensureIdentifier(., fieldInitializer)
|
||||
listener: handleIdentifier(it, fieldInitializer)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(this, null, ., it, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(this, null, ., it, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -223,23 +223,23 @@ parseUnit(extension)
|
|||
listener: handleQualified(.)
|
||||
parseMethodTypeVar(redirect)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(redirect, ExtensionType4, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(redirect, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(redirect, ExtensionType4, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(redirect, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(it)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(it, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, it, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, it, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
parseInitializers(:)
|
||||
listener: beginInitializers(:)
|
||||
|
@ -447,8 +447,8 @@ parseUnit(extension)
|
|||
listener: handleIdentifier(getter, methodDeclaration)
|
||||
parseQualifiedRestOpt(getter, methodDeclarationContinuation)
|
||||
listener: handleNoTypeVariables(=>)
|
||||
parseGetterOrFormalParameters(getter, getter, true, MemberKind.NonStaticMethod)
|
||||
listener: handleNoFormalParameters(=>, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(getter, getter, true, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: handleNoFormalParameters(=>, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt(getter)
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt(getter)
|
||||
|
@ -489,23 +489,23 @@ parseUnit(extension)
|
|||
listener: handleIdentifier(setter, methodDeclaration)
|
||||
parseQualifiedRestOpt(setter, methodDeclarationContinuation)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(setter, setter, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(setter, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(setter, setter, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(setter, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(value)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(value, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -535,11 +535,11 @@ parseUnit(extension)
|
|||
parseQualifiedRestOpt(method, methodDeclarationContinuation)
|
||||
parseMethodTypeVar(method)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(method, method, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(method, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(method, method, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(method, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -581,23 +581,23 @@ parseUnit(extension)
|
|||
listener: handleOperatorName(operator, [])
|
||||
parseMethodTypeVar([])
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters([], operator, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters([], MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters([], operator, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters([], MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(index)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(index, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -637,35 +637,35 @@ parseUnit(extension)
|
|||
listener: handleOperatorName(operator, []=)
|
||||
parseMethodTypeVar([]=)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters([]=, operator, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters([]=, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters([]=, operator, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters([]=, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(index)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(index, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue(,)
|
||||
listener: endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(,)
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(value)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(value, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(2, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -717,8 +717,8 @@ parseUnit(extension)
|
|||
listener: handleIdentifier(staticGetter, methodDeclaration)
|
||||
parseQualifiedRestOpt(staticGetter, methodDeclarationContinuation)
|
||||
listener: handleNoTypeVariables(=>)
|
||||
parseGetterOrFormalParameters(staticGetter, staticGetter, true, MemberKind.StaticMethod)
|
||||
listener: handleNoFormalParameters(=>, MemberKind.StaticMethod)
|
||||
parseGetterOrFormalParameters(staticGetter, staticGetter, true, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: handleNoFormalParameters(=>, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseInitializersOpt(staticGetter)
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt(staticGetter)
|
||||
|
@ -751,23 +751,23 @@ parseUnit(extension)
|
|||
listener: handleIdentifier(staticSetter, methodDeclaration)
|
||||
parseQualifiedRestOpt(staticSetter, methodDeclarationContinuation)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(staticSetter, staticSetter, false, MemberKind.StaticMethod)
|
||||
parseFormalParameters(staticSetter, MemberKind.StaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.StaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.StaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.StaticMethod)
|
||||
parseGetterOrFormalParameters(staticSetter, staticSetter, false, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParameters(staticSetter, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.StaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(value)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(value, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.StaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.StaticMethod)
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -796,11 +796,11 @@ parseUnit(extension)
|
|||
parseQualifiedRestOpt(staticMethod, methodDeclarationContinuation)
|
||||
parseMethodTypeVar(staticMethod)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(staticMethod, staticMethod, false, MemberKind.StaticMethod)
|
||||
parseFormalParameters(staticMethod, MemberKind.StaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.StaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.StaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.StaticMethod)
|
||||
parseGetterOrFormalParameters(staticMethod, staticMethod, false, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParameters(staticMethod, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.ExtensionTypeStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
|
|
@ -119,15 +119,15 @@ beginCompilationUnit(extension)
|
|||
handleIdentifier(constructor, methodDeclarationContinuation)
|
||||
handleQualified(.)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(this)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(this, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(this, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleNoType(()
|
||||
handleIdentifier(it, fieldInitializer)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(this, null, ., it, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(this, null, ., it, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleEmptyFunctionBody(;)
|
||||
|
@ -142,17 +142,17 @@ beginCompilationUnit(extension)
|
|||
handleIdentifier(redirect, methodDeclarationContinuation)
|
||||
handleQualified(.)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(it)
|
||||
handleType(int, null)
|
||||
handleIdentifier(it, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, it, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, it, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginInitializers(:)
|
||||
beginInitializer(this)
|
||||
handleThisExpression(this, expression)
|
||||
|
@ -254,7 +254,7 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleIdentifier(getter, methodDeclaration)
|
||||
handleNoTypeVariables(=>)
|
||||
handleNoFormalParameters(=>, MemberKind.NonStaticMethod)
|
||||
handleNoFormalParameters(=>, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleIdentifier(it, expression)
|
||||
|
@ -271,17 +271,17 @@ beginCompilationUnit(extension)
|
|||
handleVoidKeyword(void)
|
||||
handleIdentifier(setter, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(value)
|
||||
handleType(int, null)
|
||||
handleIdentifier(value, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
beginBlockFunctionBody({)
|
||||
|
@ -297,8 +297,8 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleIdentifier(method, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleIdentifier(it, expression)
|
||||
|
@ -317,17 +317,17 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleOperatorName(operator, [])
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(index)
|
||||
handleType(int, null)
|
||||
handleIdentifier(index, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleIdentifier(it, expression)
|
||||
|
@ -344,26 +344,26 @@ beginCompilationUnit(extension)
|
|||
handleVoidKeyword(void)
|
||||
handleOperatorName(operator, []=)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(index)
|
||||
handleType(int, null)
|
||||
handleIdentifier(index, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue(,)
|
||||
endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(value)
|
||||
handleType(int, null)
|
||||
handleIdentifier(value, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
endFormalParameters(2, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
beginBlockFunctionBody({)
|
||||
|
@ -392,7 +392,7 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleIdentifier(staticGetter, methodDeclaration)
|
||||
handleNoTypeVariables(=>)
|
||||
handleNoFormalParameters(=>, MemberKind.StaticMethod)
|
||||
handleNoFormalParameters(=>, MemberKind.ExtensionTypeStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleLiteralInt(42)
|
||||
|
@ -406,17 +406,17 @@ beginCompilationUnit(extension)
|
|||
handleVoidKeyword(void)
|
||||
handleIdentifier(staticSetter, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.StaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeStaticMethod)
|
||||
beginMetadataStar(int)
|
||||
endMetadataStar(0)
|
||||
beginFormalParameter(int, MemberKind.StaticMethod, null, null, null)
|
||||
beginFormalParameter(int, MemberKind.ExtensionTypeStaticMethod, null, null, null)
|
||||
handleIdentifier(int, typeReference)
|
||||
handleNoTypeArguments(value)
|
||||
handleType(int, null)
|
||||
handleIdentifier(value, formalParameterDeclaration)
|
||||
handleFormalParameterWithoutValue())
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.StaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.StaticMethod)
|
||||
endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeStaticMethod)
|
||||
endFormalParameters(1, (, ), MemberKind.ExtensionTypeStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
beginBlockFunctionBody({)
|
||||
|
@ -432,8 +432,8 @@ beginCompilationUnit(extension)
|
|||
handleType(int, null)
|
||||
handleIdentifier(staticMethod, methodDeclaration)
|
||||
handleNoTypeVariables(()
|
||||
beginFormalParameters((, MemberKind.StaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.StaticMethod)
|
||||
beginFormalParameters((, MemberKind.ExtensionTypeStaticMethod)
|
||||
endFormalParameters(0, (, ), MemberKind.ExtensionTypeStaticMethod)
|
||||
handleNoInitializers()
|
||||
handleAsyncModifier(null, null)
|
||||
handleLiteralInt(42)
|
||||
|
|
|
@ -180,21 +180,21 @@ parseUnit(extension)
|
|||
listener: handleQualified(.)
|
||||
parseMethodTypeVar(constructor)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(constructor, ExtensionType4, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(constructor, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(constructor, ExtensionType4, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(constructor, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(this)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(this, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(this, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleNoType(()
|
||||
ensureIdentifier(., fieldInitializer)
|
||||
listener: handleIdentifier(it, fieldInitializer)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(this, null, ., it, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(this, null, ., it, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -225,23 +225,23 @@ parseUnit(extension)
|
|||
listener: handleQualified(.)
|
||||
parseMethodTypeVar(redirect)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(redirect, ExtensionType4, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(redirect, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(redirect, ExtensionType4, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(redirect, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(it)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(it, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, it, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, it, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
parseInitializers(:)
|
||||
listener: beginInitializers(:)
|
||||
|
@ -451,8 +451,8 @@ parseUnit(extension)
|
|||
listener: handleIdentifier(getter, methodDeclaration)
|
||||
parseQualifiedRestOpt(getter, methodDeclarationContinuation)
|
||||
listener: handleNoTypeVariables(=>)
|
||||
parseGetterOrFormalParameters(getter, getter, true, MemberKind.NonStaticMethod)
|
||||
listener: handleNoFormalParameters(=>, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(getter, getter, true, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: handleNoFormalParameters(=>, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt(getter)
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt(getter)
|
||||
|
@ -493,23 +493,23 @@ parseUnit(extension)
|
|||
listener: handleIdentifier(setter, methodDeclaration)
|
||||
parseQualifiedRestOpt(setter, methodDeclarationContinuation)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(setter, setter, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(setter, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(setter, setter, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(setter, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(value)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(value, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -539,11 +539,11 @@ parseUnit(extension)
|
|||
parseQualifiedRestOpt(method, methodDeclarationContinuation)
|
||||
parseMethodTypeVar(method)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(method, method, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters(method, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters(method, method, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters(method, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -585,23 +585,23 @@ parseUnit(extension)
|
|||
listener: handleOperatorName(operator, [])
|
||||
parseMethodTypeVar([])
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters([], operator, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters([], MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters([], operator, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters([], MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(index)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(index, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -641,35 +641,35 @@ parseUnit(extension)
|
|||
listener: handleOperatorName(operator, []=)
|
||||
parseMethodTypeVar([]=)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters([]=, operator, false, MemberKind.NonStaticMethod)
|
||||
parseFormalParameters([]=, MemberKind.NonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseGetterOrFormalParameters([]=, operator, false, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameters([]=, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(index)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(index, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue(,)
|
||||
listener: endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, index, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseMetadataStar(,)
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.NonStaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeNonStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(value)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(value, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeNonStaticMethod)
|
||||
listener: endFormalParameters(2, (, ), MemberKind.ExtensionTypeNonStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -721,8 +721,8 @@ parseUnit(extension)
|
|||
listener: handleIdentifier(staticGetter, methodDeclaration)
|
||||
parseQualifiedRestOpt(staticGetter, methodDeclarationContinuation)
|
||||
listener: handleNoTypeVariables(=>)
|
||||
parseGetterOrFormalParameters(staticGetter, staticGetter, true, MemberKind.StaticMethod)
|
||||
listener: handleNoFormalParameters(=>, MemberKind.StaticMethod)
|
||||
parseGetterOrFormalParameters(staticGetter, staticGetter, true, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: handleNoFormalParameters(=>, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseInitializersOpt(staticGetter)
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt(staticGetter)
|
||||
|
@ -755,23 +755,23 @@ parseUnit(extension)
|
|||
listener: handleIdentifier(staticSetter, methodDeclaration)
|
||||
parseQualifiedRestOpt(staticSetter, methodDeclarationContinuation)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(staticSetter, staticSetter, false, MemberKind.StaticMethod)
|
||||
parseFormalParameters(staticSetter, MemberKind.StaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.StaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.StaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.StaticMethod)
|
||||
parseGetterOrFormalParameters(staticSetter, staticSetter, false, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParameters(staticSetter, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseMetadataStar(()
|
||||
listener: beginMetadataStar(int)
|
||||
listener: endMetadataStar(0)
|
||||
listener: beginFormalParameter(int, MemberKind.StaticMethod, null, null, null)
|
||||
listener: beginFormalParameter(int, MemberKind.ExtensionTypeStaticMethod, null, null, null)
|
||||
listener: handleIdentifier(int, typeReference)
|
||||
listener: handleNoTypeArguments(value)
|
||||
listener: handleType(int, null)
|
||||
ensureIdentifier(int, formalParameterDeclaration)
|
||||
listener: handleIdentifier(value, formalParameterDeclaration)
|
||||
listener: handleFormalParameterWithoutValue())
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.StaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.StaticMethod)
|
||||
listener: endFormalParameter(null, null, null, value, null, null, FormalParameterKind.requiredPositional, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: endFormalParameters(1, (, ), MemberKind.ExtensionTypeStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
@ -800,11 +800,11 @@ parseUnit(extension)
|
|||
parseQualifiedRestOpt(staticMethod, methodDeclarationContinuation)
|
||||
parseMethodTypeVar(staticMethod)
|
||||
listener: handleNoTypeVariables(()
|
||||
parseGetterOrFormalParameters(staticMethod, staticMethod, false, MemberKind.StaticMethod)
|
||||
parseFormalParameters(staticMethod, MemberKind.StaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.StaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.StaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.StaticMethod)
|
||||
parseGetterOrFormalParameters(staticMethod, staticMethod, false, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParameters(staticMethod, MemberKind.ExtensionTypeStaticMethod)
|
||||
parseFormalParametersRest((, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: beginFormalParameters((, MemberKind.ExtensionTypeStaticMethod)
|
||||
listener: endFormalParameters(0, (, ), MemberKind.ExtensionTypeStaticMethod)
|
||||
parseInitializersOpt())
|
||||
listener: handleNoInitializers()
|
||||
parseAsyncModifierOpt())
|
||||
|
|
|
@ -36,8 +36,8 @@ extension type Foo(core::int i) {
|
|||
constructor erroneous = self::Foo|constructor#erroneous;
|
||||
constructor tearoff erroneous = self::Foo|constructor#_#erroneous#tearOff;
|
||||
}
|
||||
extension type Bar<T extends core::Object? = dynamic>(dynamic i) {
|
||||
abstract extension-type-member representation-field get i() → dynamic;
|
||||
extension type Bar<T extends core::Object? = dynamic>(invalid-type i) {
|
||||
abstract extension-type-member representation-field get i() → invalid-type;
|
||||
constructor _ = self::Bar|constructor#_;
|
||||
constructor tearoff _ = self::Bar|constructor#_#_#tearOff;
|
||||
constructor • = self::Bar|constructor#;
|
||||
|
@ -86,28 +86,28 @@ static extension-type-member method Foo|constructor#erroneous() → self::Foo /*
|
|||
}
|
||||
static extension-type-member method Foo|constructor#_#erroneous#tearOff() → self::Foo /* = core::int */
|
||||
return self::Foo|constructor#erroneous();
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ #this = i;
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ #this = i;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#_<self::Bar|constructor#_#_#tearOff::T%>(i);
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = dynamic */ #this;
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ #this;
|
||||
#this = self::Bar|constructor#_<self::Bar|constructor#::T%>(i);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#<self::Bar|constructor#_#new#tearOff::T%>(i);
|
||||
static method main() → dynamic {
|
||||
self::expect(44, self::Foo|constructor#(42) as{Unchecked} core::int);
|
||||
self::expect(42, self::Foo|constructor#_(42) as{Unchecked} core::int);
|
||||
self::expect(3, self::Foo|constructor#redirectNamed1(5, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Foo|constructor#redirectNamed2(7, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} invalid-type);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} invalid-type);
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
|
|
|
@ -36,8 +36,8 @@ extension type Foo(core::int i) {
|
|||
constructor erroneous = self::Foo|constructor#erroneous;
|
||||
constructor tearoff erroneous = self::Foo|constructor#_#erroneous#tearOff;
|
||||
}
|
||||
extension type Bar<T extends core::Object? = dynamic>(dynamic i) {
|
||||
abstract extension-type-member representation-field get i() → dynamic;
|
||||
extension type Bar<T extends core::Object? = dynamic>(invalid-type i) {
|
||||
abstract extension-type-member representation-field get i() → invalid-type;
|
||||
constructor _ = self::Bar|constructor#_;
|
||||
constructor tearoff _ = self::Bar|constructor#_#_#tearOff;
|
||||
constructor • = self::Bar|constructor#;
|
||||
|
@ -86,28 +86,28 @@ static extension-type-member method Foo|constructor#erroneous() → self::Foo /*
|
|||
}
|
||||
static extension-type-member method Foo|constructor#_#erroneous#tearOff() → self::Foo /* = core::int */
|
||||
return self::Foo|constructor#erroneous();
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ #this = i;
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ #this = i;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#_<self::Bar|constructor#_#_#tearOff::T%>(i);
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = dynamic */ #this;
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ #this;
|
||||
#this = self::Bar|constructor#_<self::Bar|constructor#::T%>(i);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#<self::Bar|constructor#_#new#tearOff::T%>(i);
|
||||
static method main() → dynamic {
|
||||
self::expect(44, self::Foo|constructor#(42) as{Unchecked} core::int);
|
||||
self::expect(42, self::Foo|constructor#_(42) as{Unchecked} core::int);
|
||||
self::expect(3, self::Foo|constructor#redirectNamed1(5, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Foo|constructor#redirectNamed2(7, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} invalid-type);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} invalid-type);
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
|
|
|
@ -36,8 +36,8 @@ extension type Foo(core::int i) {
|
|||
constructor erroneous = self::Foo|constructor#erroneous;
|
||||
constructor tearoff erroneous = self::Foo|constructor#_#erroneous#tearOff;
|
||||
}
|
||||
extension type Bar<T extends core::Object? = dynamic>(dynamic i) {
|
||||
abstract extension-type-member representation-field get i() → dynamic;
|
||||
extension type Bar<T extends core::Object? = dynamic>(invalid-type i) {
|
||||
abstract extension-type-member representation-field get i() → invalid-type;
|
||||
constructor _ = self::Bar|constructor#_;
|
||||
constructor tearoff _ = self::Bar|constructor#_#_#tearOff;
|
||||
constructor • = self::Bar|constructor#;
|
||||
|
@ -86,28 +86,28 @@ static extension-type-member method Foo|constructor#erroneous() → self::Foo /*
|
|||
}
|
||||
static extension-type-member method Foo|constructor#_#erroneous#tearOff() → self::Foo /* = core::int */
|
||||
return self::Foo|constructor#erroneous();
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ #this = i;
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ #this = i;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#_<self::Bar|constructor#_#_#tearOff::T%>(i);
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = dynamic */ #this;
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ #this;
|
||||
#this = self::Bar|constructor#_<self::Bar|constructor#::T%>(i);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#<self::Bar|constructor#_#new#tearOff::T%>(i);
|
||||
static method main() → dynamic {
|
||||
self::expect(44, self::Foo|constructor#(42) as{Unchecked} core::int);
|
||||
self::expect(42, self::Foo|constructor#_(42) as{Unchecked} core::int);
|
||||
self::expect(3, self::Foo|constructor#redirectNamed1(5, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Foo|constructor#redirectNamed2(7, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} invalid-type);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} invalid-type);
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
|
|
|
@ -36,8 +36,8 @@ extension type Foo(core::int i) {
|
|||
constructor erroneous = self::Foo|constructor#erroneous;
|
||||
constructor tearoff erroneous = self::Foo|constructor#_#erroneous#tearOff;
|
||||
}
|
||||
extension type Bar<T extends core::Object? = dynamic>(dynamic i) {
|
||||
abstract extension-type-member representation-field get i() → dynamic;
|
||||
extension type Bar<T extends core::Object? = dynamic>(invalid-type i) {
|
||||
abstract extension-type-member representation-field get i() → invalid-type;
|
||||
constructor _ = self::Bar|constructor#_;
|
||||
constructor tearoff _ = self::Bar|constructor#_#_#tearOff;
|
||||
constructor • = self::Bar|constructor#;
|
||||
|
@ -86,28 +86,28 @@ static extension-type-member method Foo|constructor#erroneous() → self::Foo /*
|
|||
}
|
||||
static extension-type-member method Foo|constructor#_#erroneous#tearOff() → self::Foo /* = core::int */
|
||||
return self::Foo|constructor#erroneous();
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ #this = i;
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ #this = i;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#_<self::Bar|constructor#_#_#tearOff::T%>(i);
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = dynamic */ #this;
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ #this;
|
||||
#this = self::Bar|constructor#_<self::Bar|constructor#::T%>(i);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#<self::Bar|constructor#_#new#tearOff::T%>(i);
|
||||
static method main() → dynamic {
|
||||
self::expect(44, self::Foo|constructor#(42) as{Unchecked} core::int);
|
||||
self::expect(42, self::Foo|constructor#_(42) as{Unchecked} core::int);
|
||||
self::expect(3, self::Foo|constructor#redirectNamed1(5, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Foo|constructor#redirectNamed2(7, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} invalid-type);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} invalid-type);
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
|
|
|
@ -24,8 +24,8 @@ extension type Foo(core::int i) {
|
|||
constructor erroneous = self::Foo|constructor#erroneous;
|
||||
constructor tearoff erroneous = self::Foo|constructor#_#erroneous#tearOff;
|
||||
}
|
||||
extension type Bar<T extends core::Object? = dynamic>(dynamic i) {
|
||||
abstract extension-type-member representation-field get i() → dynamic;
|
||||
extension type Bar<T extends core::Object? = dynamic>(invalid-type i) {
|
||||
abstract extension-type-member representation-field get i() → invalid-type;
|
||||
constructor _ = self::Bar|constructor#_;
|
||||
constructor tearoff _ = self::Bar|constructor#_#_#tearOff;
|
||||
constructor • = self::Bar|constructor#;
|
||||
|
@ -55,13 +55,13 @@ static extension-type-member method Foo|constructor#erroneous() → self::Foo /*
|
|||
;
|
||||
static extension-type-member method Foo|constructor#_#erroneous#tearOff() → self::Foo /* = core::int */
|
||||
return self::Foo|constructor#erroneous();
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_::T%> /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */
|
||||
;
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#_<self::Bar|constructor#_#_#tearOff::T%>(i);
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = invalid-type */
|
||||
;
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#<self::Bar|constructor#_#new#tearOff::T%>(i);
|
||||
static method main() → dynamic
|
||||
;
|
||||
|
|
|
@ -36,8 +36,8 @@ extension type Foo(core::int i) {
|
|||
constructor erroneous = self::Foo|constructor#erroneous;
|
||||
constructor tearoff erroneous = self::Foo|constructor#_#erroneous#tearOff;
|
||||
}
|
||||
extension type Bar<T extends core::Object? = dynamic>(dynamic i) {
|
||||
abstract extension-type-member representation-field get i() → dynamic;
|
||||
extension type Bar<T extends core::Object? = dynamic>(invalid-type i) {
|
||||
abstract extension-type-member representation-field get i() → invalid-type;
|
||||
constructor _ = self::Bar|constructor#_;
|
||||
constructor tearoff _ = self::Bar|constructor#_#_#tearOff;
|
||||
constructor • = self::Bar|constructor#;
|
||||
|
@ -86,28 +86,28 @@ static extension-type-member method Foo|constructor#erroneous() → self::Foo /*
|
|||
}
|
||||
static extension-type-member method Foo|constructor#_#erroneous#tearOff() → self::Foo /* = core::int */
|
||||
return self::Foo|constructor#erroneous();
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = dynamic */ #this = i;
|
||||
static extension-type-member method Bar|constructor#_<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#_::T%> /* = invalid-type */ #this = i;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(dynamic i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#_#tearOff<T extends core::Object? = dynamic>(invalid-type i) → self::Bar<self::Bar|constructor#_#_#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#_<self::Bar|constructor#_#_#tearOff::T%>(i);
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = dynamic */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = dynamic */ #this;
|
||||
static extension-type-member method Bar|constructor#<T extends core::Object? = dynamic>(self::Bar|constructor#::T% i) → self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ {
|
||||
lowered final self::Bar<self::Bar|constructor#::T%> /* = invalid-type */ #this;
|
||||
#this = self::Bar|constructor#_<self::Bar|constructor#::T%>(i);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = dynamic */
|
||||
static extension-type-member method Bar|constructor#_#new#tearOff<T extends core::Object? = dynamic>(self::Bar|constructor#_#new#tearOff::T% i) → self::Bar<self::Bar|constructor#_#new#tearOff::T%>% /* = invalid-type */
|
||||
return self::Bar|constructor#<self::Bar|constructor#_#new#tearOff::T%>(i);
|
||||
static method main() → dynamic {
|
||||
self::expect(44, self::Foo|constructor#(42) as{Unchecked} core::int);
|
||||
self::expect(42, self::Foo|constructor#_(42) as{Unchecked} core::int);
|
||||
self::expect(3, self::Foo|constructor#redirectNamed1(5, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Foo|constructor#redirectNamed2(7, 2) as{Unchecked} core::int);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} dynamic);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} dynamic);
|
||||
self::expect(5, self::Bar|constructor#<core::int>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#<core::String>("foo") as{Unchecked} invalid-type);
|
||||
self::expect(5, self::Bar|constructor#_<dynamic>(5) as{Unchecked} invalid-type);
|
||||
self::expect("foo", self::Bar|constructor#_<dynamic>("foo") as{Unchecked} invalid-type);
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
|
|
|
@ -46,8 +46,8 @@ extension type E3(core::int foo) {
|
|||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E4(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -87,11 +87,11 @@ static extension-type-member method E3|constructor#named(core::int foo, [has-dec
|
|||
}
|
||||
static extension-type-member method E3|constructor#_#named#tearOff(core::int foo, [has-declared-initializer invalid-type bar = #C1]) → self::E3 /* = core::int */
|
||||
return self::E3|constructor#named(foo, bar);
|
||||
static extension-type-member method E4|constructor#(dynamic foo) → self::E4 /* = dynamic */ {
|
||||
lowered final self::E4 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E4|constructor#(invalid-type foo) → self::E4 /* = invalid-type */ {
|
||||
lowered final self::E4 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(dynamic foo) → self::E4 /* = dynamic */
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(invalid-type foo) → self::E4 /* = invalid-type */
|
||||
return self::E4|constructor#(foo);
|
||||
|
||||
constants {
|
||||
|
|
|
@ -46,8 +46,8 @@ extension type E3(core::int foo) {
|
|||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E4(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -87,11 +87,11 @@ static extension-type-member method E3|constructor#named(core::int foo, [has-dec
|
|||
}
|
||||
static extension-type-member method E3|constructor#_#named#tearOff(core::int foo, [has-declared-initializer invalid-type bar = #C1]) → self::E3 /* = core::int */
|
||||
return self::E3|constructor#named(foo, bar);
|
||||
static extension-type-member method E4|constructor#(dynamic foo) → self::E4 /* = dynamic */ {
|
||||
lowered final self::E4 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E4|constructor#(invalid-type foo) → self::E4 /* = invalid-type */ {
|
||||
lowered final self::E4 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(dynamic foo) → self::E4 /* = dynamic */
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(invalid-type foo) → self::E4 /* = invalid-type */
|
||||
return self::E4|constructor#(foo);
|
||||
|
||||
constants {
|
||||
|
|
|
@ -46,8 +46,8 @@ extension type E3(core::int foo) {
|
|||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E4(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -87,11 +87,11 @@ static extension-type-member method E3|constructor#named(core::int foo, [has-dec
|
|||
}
|
||||
static extension-type-member method E3|constructor#_#named#tearOff(core::int foo, [has-declared-initializer invalid-type bar = #C1]) → self::E3 /* = core::int */
|
||||
return self::E3|constructor#named(foo, bar);
|
||||
static extension-type-member method E4|constructor#(dynamic foo) → self::E4 /* = dynamic */ {
|
||||
lowered final self::E4 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E4|constructor#(invalid-type foo) → self::E4 /* = invalid-type */ {
|
||||
lowered final self::E4 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(dynamic foo) → self::E4 /* = dynamic */
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(invalid-type foo) → self::E4 /* = invalid-type */
|
||||
return self::E4|constructor#(foo);
|
||||
|
||||
constants {
|
||||
|
|
|
@ -46,8 +46,8 @@ extension type E3(core::int foo) {
|
|||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E4(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -87,11 +87,11 @@ static extension-type-member method E3|constructor#named(core::int foo, [has-dec
|
|||
}
|
||||
static extension-type-member method E3|constructor#_#named#tearOff(core::int foo, [has-declared-initializer invalid-type bar = #C1]) → self::E3 /* = core::int */
|
||||
return self::E3|constructor#named(foo, bar);
|
||||
static extension-type-member method E4|constructor#(dynamic foo) → self::E4 /* = dynamic */ {
|
||||
lowered final self::E4 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E4|constructor#(invalid-type foo) → self::E4 /* = invalid-type */ {
|
||||
lowered final self::E4 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(dynamic foo) → self::E4 /* = dynamic */
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(invalid-type foo) → self::E4 /* = invalid-type */
|
||||
return self::E4|constructor#(foo);
|
||||
|
||||
constants {
|
||||
|
|
|
@ -46,8 +46,8 @@ extension type E3(core::int foo) {
|
|||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E4(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ static extension-type-member method E3|constructor#named(core::int foo, [has-dec
|
|||
;
|
||||
static extension-type-member method E3|constructor#_#named#tearOff(core::int foo, [has-declared-initializer invalid-type bar]) → self::E3 /* = core::int */
|
||||
return self::E3|constructor#named(foo, bar);
|
||||
static extension-type-member method E4|constructor#(dynamic foo) → self::E4 /* = dynamic */
|
||||
static extension-type-member method E4|constructor#(invalid-type foo) → self::E4 /* = invalid-type */
|
||||
;
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(dynamic foo) → self::E4 /* = dynamic */
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(invalid-type foo) → self::E4 /* = invalid-type */
|
||||
return self::E4|constructor#(foo);
|
||||
|
|
|
@ -46,8 +46,8 @@ extension type E3(core::int foo) {
|
|||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E4(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -87,11 +87,11 @@ static extension-type-member method E3|constructor#named(core::int foo, [has-dec
|
|||
}
|
||||
static extension-type-member method E3|constructor#_#named#tearOff(core::int foo, [has-declared-initializer invalid-type bar = #C1]) → self::E3 /* = core::int */
|
||||
return self::E3|constructor#named(foo, bar);
|
||||
static extension-type-member method E4|constructor#(dynamic foo) → self::E4 /* = dynamic */ {
|
||||
lowered final self::E4 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E4|constructor#(invalid-type foo) → self::E4 /* = invalid-type */ {
|
||||
lowered final self::E4 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(dynamic foo) → self::E4 /* = dynamic */
|
||||
static extension-type-member method E4|constructor#_#new#tearOff(invalid-type foo) → self::E4 /* = invalid-type */
|
||||
return self::E4|constructor#(foo);
|
||||
|
||||
constants {
|
||||
|
|
22
pkg/front_end/testcases/extension_types/issue53324.dart
Normal file
22
pkg/front_end/testcases/extension_types/issue53324.dart
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by b
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
void method(covariant int i) /* Error */ {}
|
||||
void setter(covariant int x) /* Error */ {}
|
||||
|
||||
extension type ET1(num id) {
|
||||
void method(covariant int i) /* Error */ {}
|
||||
}
|
||||
|
||||
extension type ET2<T extends num>(T id) {
|
||||
void setter(covariant int x) /* Error */ {}
|
||||
}
|
||||
|
||||
extension type ET3(num id) {
|
||||
int operator +(covariant int other) /* Error */ => other + id.floor();
|
||||
}
|
||||
|
||||
extension type ET4(covariant num id) /* Error */ {}
|
||||
|
||||
extension type ET5(required num id) /* Error */ {}
|
|
@ -0,0 +1,112 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:5:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:6:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:9:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:13:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:17:18: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// int operator +(covariant int other) /* Error */ => other + id.floor();
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:20:20: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type ET4(covariant num id) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:22:20: Error: Can't have modifier 'required' here.
|
||||
// Try removing 'required'.
|
||||
// extension type ET5(required num id) /* Error */ {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type ET1(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
method method = self::ET1|method;
|
||||
method tearoff method = self::ET1|get#method;
|
||||
constructor • = self::ET1|constructor#;
|
||||
constructor tearoff • = self::ET1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET2<T extends core::num>(T id) {
|
||||
abstract extension-type-member representation-field get id() → T;
|
||||
method setter = self::ET2|setter;
|
||||
method tearoff setter = self::ET2|get#setter;
|
||||
constructor • = self::ET2|constructor#;
|
||||
constructor tearoff • = self::ET2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET3(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
operator + = self::ET3|+;
|
||||
constructor • = self::ET3|constructor#;
|
||||
constructor tearoff • = self::ET3|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET4(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET4|constructor#;
|
||||
constructor tearoff • = self::ET4|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET5(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET5|constructor#;
|
||||
constructor tearoff • = self::ET5|constructor#_#new#tearOff;
|
||||
}
|
||||
static method method(covariant-by-declaration core::int i) → void {}
|
||||
static method setter(covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET1|constructor#(core::num id) → self::ET1 /* = core::num */ {
|
||||
lowered final self::ET1 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET1|constructor#_#new#tearOff(core::num id) → self::ET1 /* = core::num */
|
||||
return self::ET1|constructor#(id);
|
||||
static extension-type-member method ET1|method(lowered final self::ET1 /* = core::num */ #this, covariant-by-declaration core::int i) → void {}
|
||||
static extension-type-member method ET1|get#method(lowered final self::ET1 /* = core::num */ #this) → (core::int) → void
|
||||
return (core::int i) → void => self::ET1|method(#this, i);
|
||||
static extension-type-member method ET2|constructor#<T extends core::num>(self::ET2|constructor#::T id) → self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ {
|
||||
lowered final self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET2|constructor#_#new#tearOff<T extends core::num>(self::ET2|constructor#_#new#tearOff::T id) → self::ET2<self::ET2|constructor#_#new#tearOff::T>% /* = self::ET2|constructor#_#new#tearOff::T */
|
||||
return self::ET2|constructor#<self::ET2|constructor#_#new#tearOff::T>(id);
|
||||
static extension-type-member method ET2|setter<T extends core::num>(lowered final self::ET2<self::ET2|setter::T> /* = self::ET2|setter::T */ #this, covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET2|get#setter<T extends core::num>(lowered final self::ET2<self::ET2|get#setter::T>% /* = self::ET2|get#setter::T */ #this) → (core::int) → void
|
||||
return (core::int x) → void => self::ET2|setter<self::ET2|get#setter::T>(#this, x);
|
||||
static extension-type-member method ET3|constructor#(core::num id) → self::ET3 /* = core::num */ {
|
||||
lowered final self::ET3 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET3|constructor#_#new#tearOff(core::num id) → self::ET3 /* = core::num */
|
||||
return self::ET3|constructor#(id);
|
||||
static extension-type-member method ET3|+(lowered final self::ET3 /* = core::num */ #this, covariant-by-declaration core::int other) → core::int
|
||||
return other.{core::num::+}((#this as{Unchecked} core::num).{core::num::floor}(){() → core::int}){(core::num) → core::int};
|
||||
static extension-type-member method ET4|constructor#(covariant-by-declaration core::num id) → self::ET4 /* = core::num */ {
|
||||
lowered final self::ET4 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET4|constructor#_#new#tearOff(core::num id) → self::ET4 /* = core::num */
|
||||
return self::ET4|constructor#(id);
|
||||
static extension-type-member method ET5|constructor#(core::num id) → self::ET5 /* = core::num */ {
|
||||
lowered final self::ET5 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET5|constructor#_#new#tearOff(core::num id) → self::ET5 /* = core::num */
|
||||
return self::ET5|constructor#(id);
|
|
@ -0,0 +1,112 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:5:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:6:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:9:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:13:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:17:18: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// int operator +(covariant int other) /* Error */ => other + id.floor();
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:20:20: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type ET4(covariant num id) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:22:20: Error: Can't have modifier 'required' here.
|
||||
// Try removing 'required'.
|
||||
// extension type ET5(required num id) /* Error */ {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type ET1(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
method method = self::ET1|method;
|
||||
method tearoff method = self::ET1|get#method;
|
||||
constructor • = self::ET1|constructor#;
|
||||
constructor tearoff • = self::ET1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET2<T extends core::num>(T id) {
|
||||
abstract extension-type-member representation-field get id() → T;
|
||||
method setter = self::ET2|setter;
|
||||
method tearoff setter = self::ET2|get#setter;
|
||||
constructor • = self::ET2|constructor#;
|
||||
constructor tearoff • = self::ET2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET3(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
operator + = self::ET3|+;
|
||||
constructor • = self::ET3|constructor#;
|
||||
constructor tearoff • = self::ET3|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET4(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET4|constructor#;
|
||||
constructor tearoff • = self::ET4|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET5(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET5|constructor#;
|
||||
constructor tearoff • = self::ET5|constructor#_#new#tearOff;
|
||||
}
|
||||
static method method(covariant-by-declaration core::int i) → void {}
|
||||
static method setter(covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET1|constructor#(core::num id) → self::ET1 /* = core::num */ {
|
||||
lowered final self::ET1 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET1|constructor#_#new#tearOff(core::num id) → self::ET1 /* = core::num */
|
||||
return self::ET1|constructor#(id);
|
||||
static extension-type-member method ET1|method(lowered final self::ET1 /* = core::num */ #this, covariant-by-declaration core::int i) → void {}
|
||||
static extension-type-member method ET1|get#method(lowered final self::ET1 /* = core::num */ #this) → (core::int) → void
|
||||
return (core::int i) → void => self::ET1|method(#this, i);
|
||||
static extension-type-member method ET2|constructor#<T extends core::num>(self::ET2|constructor#::T id) → self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ {
|
||||
lowered final self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET2|constructor#_#new#tearOff<T extends core::num>(self::ET2|constructor#_#new#tearOff::T id) → self::ET2<self::ET2|constructor#_#new#tearOff::T>% /* = self::ET2|constructor#_#new#tearOff::T */
|
||||
return self::ET2|constructor#<self::ET2|constructor#_#new#tearOff::T>(id);
|
||||
static extension-type-member method ET2|setter<T extends core::num>(lowered final self::ET2<self::ET2|setter::T> /* = self::ET2|setter::T */ #this, covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET2|get#setter<T extends core::num>(lowered final self::ET2<self::ET2|get#setter::T>% /* = self::ET2|get#setter::T */ #this) → (core::int) → void
|
||||
return (core::int x) → void => self::ET2|setter<self::ET2|get#setter::T>(#this, x);
|
||||
static extension-type-member method ET3|constructor#(core::num id) → self::ET3 /* = core::num */ {
|
||||
lowered final self::ET3 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET3|constructor#_#new#tearOff(core::num id) → self::ET3 /* = core::num */
|
||||
return self::ET3|constructor#(id);
|
||||
static extension-type-member method ET3|+(lowered final self::ET3 /* = core::num */ #this, covariant-by-declaration core::int other) → core::int
|
||||
return other.{core::num::+}((#this as{Unchecked} core::num).{core::num::floor}(){() → core::int}){(core::num) → core::int};
|
||||
static extension-type-member method ET4|constructor#(covariant-by-declaration core::num id) → self::ET4 /* = core::num */ {
|
||||
lowered final self::ET4 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET4|constructor#_#new#tearOff(core::num id) → self::ET4 /* = core::num */
|
||||
return self::ET4|constructor#(id);
|
||||
static extension-type-member method ET5|constructor#(core::num id) → self::ET5 /* = core::num */ {
|
||||
lowered final self::ET5 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET5|constructor#_#new#tearOff(core::num id) → self::ET5 /* = core::num */
|
||||
return self::ET5|constructor#(id);
|
|
@ -0,0 +1,13 @@
|
|||
void method(covariant int i) {}
|
||||
void setter(covariant int x) {}
|
||||
extension type ET1(num id) {
|
||||
void method(covariant int i) {}
|
||||
}
|
||||
extension type ET2<T extends num>(T id) {
|
||||
void setter(covariant int x) {}
|
||||
}
|
||||
extension type ET3(num id) {
|
||||
int operator +(covariant int other) => other + id.floor();
|
||||
}
|
||||
extension type ET4(covariant num id) {}
|
||||
extension type ET5(required num id) {}
|
|
@ -0,0 +1,13 @@
|
|||
extension type ET1(num id) {
|
||||
void method(covariant int i) {}
|
||||
}
|
||||
extension type ET2<T extends num>(T id) {
|
||||
void setter(covariant int x) {}
|
||||
}
|
||||
extension type ET3(num id) {
|
||||
int operator +(covariant int other) => other + id.floor();
|
||||
}
|
||||
extension type ET4(covariant num id) {}
|
||||
extension type ET5(required num id) {}
|
||||
void method(covariant int i) {}
|
||||
void setter(covariant int x) {}
|
|
@ -0,0 +1,112 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:5:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:6:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:9:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:13:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:17:18: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// int operator +(covariant int other) /* Error */ => other + id.floor();
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:20:20: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type ET4(covariant num id) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:22:20: Error: Can't have modifier 'required' here.
|
||||
// Try removing 'required'.
|
||||
// extension type ET5(required num id) /* Error */ {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type ET1(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
method method = self::ET1|method;
|
||||
method tearoff method = self::ET1|get#method;
|
||||
constructor • = self::ET1|constructor#;
|
||||
constructor tearoff • = self::ET1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET2<T extends core::num>(T id) {
|
||||
abstract extension-type-member representation-field get id() → T;
|
||||
method setter = self::ET2|setter;
|
||||
method tearoff setter = self::ET2|get#setter;
|
||||
constructor • = self::ET2|constructor#;
|
||||
constructor tearoff • = self::ET2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET3(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
operator + = self::ET3|+;
|
||||
constructor • = self::ET3|constructor#;
|
||||
constructor tearoff • = self::ET3|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET4(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET4|constructor#;
|
||||
constructor tearoff • = self::ET4|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET5(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET5|constructor#;
|
||||
constructor tearoff • = self::ET5|constructor#_#new#tearOff;
|
||||
}
|
||||
static method method(covariant-by-declaration core::int i) → void {}
|
||||
static method setter(covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET1|constructor#(core::num id) → self::ET1 /* = core::num */ {
|
||||
lowered final self::ET1 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET1|constructor#_#new#tearOff(core::num id) → self::ET1 /* = core::num */
|
||||
return self::ET1|constructor#(id);
|
||||
static extension-type-member method ET1|method(lowered final self::ET1 /* = core::num */ #this, covariant-by-declaration core::int i) → void {}
|
||||
static extension-type-member method ET1|get#method(lowered final self::ET1 /* = core::num */ #this) → (core::int) → void
|
||||
return (core::int i) → void => self::ET1|method(#this, i);
|
||||
static extension-type-member method ET2|constructor#<T extends core::num>(self::ET2|constructor#::T id) → self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ {
|
||||
lowered final self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET2|constructor#_#new#tearOff<T extends core::num>(self::ET2|constructor#_#new#tearOff::T id) → self::ET2<self::ET2|constructor#_#new#tearOff::T>% /* = self::ET2|constructor#_#new#tearOff::T */
|
||||
return self::ET2|constructor#<self::ET2|constructor#_#new#tearOff::T>(id);
|
||||
static extension-type-member method ET2|setter<T extends core::num>(lowered final self::ET2<self::ET2|setter::T> /* = self::ET2|setter::T */ #this, covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET2|get#setter<T extends core::num>(lowered final self::ET2<self::ET2|get#setter::T>% /* = self::ET2|get#setter::T */ #this) → (core::int) → void
|
||||
return (core::int x) → void => self::ET2|setter<self::ET2|get#setter::T>(#this, x);
|
||||
static extension-type-member method ET3|constructor#(core::num id) → self::ET3 /* = core::num */ {
|
||||
lowered final self::ET3 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET3|constructor#_#new#tearOff(core::num id) → self::ET3 /* = core::num */
|
||||
return self::ET3|constructor#(id);
|
||||
static extension-type-member method ET3|+(lowered final self::ET3 /* = core::num */ #this, covariant-by-declaration core::int other) → core::int
|
||||
return other.{core::num::+}((#this as{Unchecked} core::num).{core::num::floor}(){() → core::int}){(core::num) → core::int};
|
||||
static extension-type-member method ET4|constructor#(covariant-by-declaration core::num id) → self::ET4 /* = core::num */ {
|
||||
lowered final self::ET4 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET4|constructor#_#new#tearOff(core::num id) → self::ET4 /* = core::num */
|
||||
return self::ET4|constructor#(id);
|
||||
static extension-type-member method ET5|constructor#(core::num id) → self::ET5 /* = core::num */ {
|
||||
lowered final self::ET5 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET5|constructor#_#new#tearOff(core::num id) → self::ET5 /* = core::num */
|
||||
return self::ET5|constructor#(id);
|
|
@ -0,0 +1,112 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:5:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:6:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:9:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:13:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:17:18: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// int operator +(covariant int other) /* Error */ => other + id.floor();
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:20:20: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type ET4(covariant num id) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:22:20: Error: Can't have modifier 'required' here.
|
||||
// Try removing 'required'.
|
||||
// extension type ET5(required num id) /* Error */ {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type ET1(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
method method = self::ET1|method;
|
||||
method tearoff method = self::ET1|get#method;
|
||||
constructor • = self::ET1|constructor#;
|
||||
constructor tearoff • = self::ET1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET2<T extends core::num>(T id) {
|
||||
abstract extension-type-member representation-field get id() → T;
|
||||
method setter = self::ET2|setter;
|
||||
method tearoff setter = self::ET2|get#setter;
|
||||
constructor • = self::ET2|constructor#;
|
||||
constructor tearoff • = self::ET2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET3(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
operator + = self::ET3|+;
|
||||
constructor • = self::ET3|constructor#;
|
||||
constructor tearoff • = self::ET3|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET4(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET4|constructor#;
|
||||
constructor tearoff • = self::ET4|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET5(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET5|constructor#;
|
||||
constructor tearoff • = self::ET5|constructor#_#new#tearOff;
|
||||
}
|
||||
static method method(covariant-by-declaration core::int i) → void {}
|
||||
static method setter(covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET1|constructor#(core::num id) → self::ET1 /* = core::num */ {
|
||||
lowered final self::ET1 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET1|constructor#_#new#tearOff(core::num id) → self::ET1 /* = core::num */
|
||||
return self::ET1|constructor#(id);
|
||||
static extension-type-member method ET1|method(lowered final self::ET1 /* = core::num */ #this, covariant-by-declaration core::int i) → void {}
|
||||
static extension-type-member method ET1|get#method(lowered final self::ET1 /* = core::num */ #this) → (core::int) → void
|
||||
return (core::int i) → void => self::ET1|method(#this, i);
|
||||
static extension-type-member method ET2|constructor#<T extends core::num>(self::ET2|constructor#::T id) → self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ {
|
||||
lowered final self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET2|constructor#_#new#tearOff<T extends core::num>(self::ET2|constructor#_#new#tearOff::T id) → self::ET2<self::ET2|constructor#_#new#tearOff::T>% /* = self::ET2|constructor#_#new#tearOff::T */
|
||||
return self::ET2|constructor#<self::ET2|constructor#_#new#tearOff::T>(id);
|
||||
static extension-type-member method ET2|setter<T extends core::num>(lowered final self::ET2<self::ET2|setter::T> /* = self::ET2|setter::T */ #this, covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET2|get#setter<T extends core::num>(lowered final self::ET2<self::ET2|get#setter::T>% /* = self::ET2|get#setter::T */ #this) → (core::int) → void
|
||||
return (core::int x) → void => self::ET2|setter<self::ET2|get#setter::T>(#this, x);
|
||||
static extension-type-member method ET3|constructor#(core::num id) → self::ET3 /* = core::num */ {
|
||||
lowered final self::ET3 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET3|constructor#_#new#tearOff(core::num id) → self::ET3 /* = core::num */
|
||||
return self::ET3|constructor#(id);
|
||||
static extension-type-member method ET3|+(lowered final self::ET3 /* = core::num */ #this, covariant-by-declaration core::int other) → core::int
|
||||
return other.{core::num::+}((#this as{Unchecked} core::num).{core::num::floor}(){() → core::int}){(core::num) → core::int};
|
||||
static extension-type-member method ET4|constructor#(covariant-by-declaration core::num id) → self::ET4 /* = core::num */ {
|
||||
lowered final self::ET4 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET4|constructor#_#new#tearOff(core::num id) → self::ET4 /* = core::num */
|
||||
return self::ET4|constructor#(id);
|
||||
static extension-type-member method ET5|constructor#(core::num id) → self::ET5 /* = core::num */ {
|
||||
lowered final self::ET5 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET5|constructor#_#new#tearOff(core::num id) → self::ET5 /* = core::num */
|
||||
return self::ET5|constructor#(id);
|
|
@ -0,0 +1,106 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:5:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:6:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:9:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:13:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:17:18: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// int operator +(covariant int other) /* Error */ => other + id.floor();
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:20:20: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type ET4(covariant num id) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:22:20: Error: Can't have modifier 'required' here.
|
||||
// Try removing 'required'.
|
||||
// extension type ET5(required num id) /* Error */ {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type ET1(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
method method = self::ET1|method;
|
||||
method tearoff method = self::ET1|get#method;
|
||||
constructor • = self::ET1|constructor#;
|
||||
constructor tearoff • = self::ET1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET2<T extends core::num>(T id) {
|
||||
abstract extension-type-member representation-field get id() → T;
|
||||
method setter = self::ET2|setter;
|
||||
method tearoff setter = self::ET2|get#setter;
|
||||
constructor • = self::ET2|constructor#;
|
||||
constructor tearoff • = self::ET2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET3(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
operator + = self::ET3|+;
|
||||
constructor • = self::ET3|constructor#;
|
||||
constructor tearoff • = self::ET3|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET4(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET4|constructor#;
|
||||
constructor tearoff • = self::ET4|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET5(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET5|constructor#;
|
||||
constructor tearoff • = self::ET5|constructor#_#new#tearOff;
|
||||
}
|
||||
static method method(covariant-by-declaration core::int i) → void
|
||||
;
|
||||
static method setter(covariant-by-declaration core::int x) → void
|
||||
;
|
||||
static extension-type-member method ET1|constructor#(core::num id) → self::ET1 /* = core::num */
|
||||
;
|
||||
static extension-type-member method ET1|constructor#_#new#tearOff(core::num id) → self::ET1 /* = core::num */
|
||||
return self::ET1|constructor#(id);
|
||||
static extension-type-member method ET1|method(lowered final self::ET1 /* = core::num */ #this, covariant-by-declaration core::int i) → void
|
||||
;
|
||||
static extension-type-member method ET1|get#method(lowered final self::ET1 /* = core::num */ #this) → (core::int) → void
|
||||
return (core::int i) → void => self::ET1|method(#this, i);
|
||||
static extension-type-member method ET2|constructor#<T extends core::num>(self::ET2|constructor#::T id) → self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */
|
||||
;
|
||||
static extension-type-member method ET2|constructor#_#new#tearOff<T extends core::num>(self::ET2|constructor#_#new#tearOff::T id) → self::ET2<self::ET2|constructor#_#new#tearOff::T>% /* = self::ET2|constructor#_#new#tearOff::T */
|
||||
return self::ET2|constructor#<self::ET2|constructor#_#new#tearOff::T>(id);
|
||||
static extension-type-member method ET2|setter<T extends core::num>(lowered final self::ET2<self::ET2|setter::T> /* = self::ET2|setter::T */ #this, covariant-by-declaration core::int x) → void
|
||||
;
|
||||
static extension-type-member method ET2|get#setter<T extends core::num>(lowered final self::ET2<self::ET2|get#setter::T>% /* = self::ET2|get#setter::T */ #this) → (core::int) → void
|
||||
return (core::int x) → void => self::ET2|setter<self::ET2|get#setter::T>(#this, x);
|
||||
static extension-type-member method ET3|constructor#(core::num id) → self::ET3 /* = core::num */
|
||||
;
|
||||
static extension-type-member method ET3|constructor#_#new#tearOff(core::num id) → self::ET3 /* = core::num */
|
||||
return self::ET3|constructor#(id);
|
||||
static extension-type-member method ET3|+(lowered final self::ET3 /* = core::num */ #this, covariant-by-declaration core::int other) → core::int
|
||||
;
|
||||
static extension-type-member method ET4|constructor#(covariant-by-declaration core::num id) → self::ET4 /* = core::num */
|
||||
;
|
||||
static extension-type-member method ET4|constructor#_#new#tearOff(core::num id) → self::ET4 /* = core::num */
|
||||
return self::ET4|constructor#(id);
|
||||
static extension-type-member method ET5|constructor#(core::num id) → self::ET5 /* = core::num */
|
||||
;
|
||||
static extension-type-member method ET5|constructor#_#new#tearOff(core::num id) → self::ET5 /* = core::num */
|
||||
return self::ET5|constructor#(id);
|
|
@ -0,0 +1,112 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:5:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:6:13: Error: Can't have modifier 'covariant' here.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:9:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void method(covariant int i) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:13:15: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// void setter(covariant int x) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:17:18: Error: Can't have modifier 'covariant' in an extension type.
|
||||
// Try removing 'covariant'.
|
||||
// int operator +(covariant int other) /* Error */ => other + id.floor();
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:20:20: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type ET4(covariant num id) /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53324.dart:22:20: Error: Can't have modifier 'required' here.
|
||||
// Try removing 'required'.
|
||||
// extension type ET5(required num id) /* Error */ {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type ET1(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
method method = self::ET1|method;
|
||||
method tearoff method = self::ET1|get#method;
|
||||
constructor • = self::ET1|constructor#;
|
||||
constructor tearoff • = self::ET1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET2<T extends core::num>(T id) {
|
||||
abstract extension-type-member representation-field get id() → T;
|
||||
method setter = self::ET2|setter;
|
||||
method tearoff setter = self::ET2|get#setter;
|
||||
constructor • = self::ET2|constructor#;
|
||||
constructor tearoff • = self::ET2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET3(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
operator + = self::ET3|+;
|
||||
constructor • = self::ET3|constructor#;
|
||||
constructor tearoff • = self::ET3|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET4(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET4|constructor#;
|
||||
constructor tearoff • = self::ET4|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET5(core::num id) {
|
||||
abstract extension-type-member representation-field get id() → core::num;
|
||||
constructor • = self::ET5|constructor#;
|
||||
constructor tearoff • = self::ET5|constructor#_#new#tearOff;
|
||||
}
|
||||
static method method(covariant-by-declaration core::int i) → void {}
|
||||
static method setter(covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET1|constructor#(core::num id) → self::ET1 /* = core::num */ {
|
||||
lowered final self::ET1 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET1|constructor#_#new#tearOff(core::num id) → self::ET1 /* = core::num */
|
||||
return self::ET1|constructor#(id);
|
||||
static extension-type-member method ET1|method(lowered final self::ET1 /* = core::num */ #this, covariant-by-declaration core::int i) → void {}
|
||||
static extension-type-member method ET1|get#method(lowered final self::ET1 /* = core::num */ #this) → (core::int) → void
|
||||
return (core::int i) → void => self::ET1|method(#this, i);
|
||||
static extension-type-member method ET2|constructor#<T extends core::num>(self::ET2|constructor#::T id) → self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ {
|
||||
lowered final self::ET2<self::ET2|constructor#::T> /* = self::ET2|constructor#::T */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET2|constructor#_#new#tearOff<T extends core::num>(self::ET2|constructor#_#new#tearOff::T id) → self::ET2<self::ET2|constructor#_#new#tearOff::T>% /* = self::ET2|constructor#_#new#tearOff::T */
|
||||
return self::ET2|constructor#<self::ET2|constructor#_#new#tearOff::T>(id);
|
||||
static extension-type-member method ET2|setter<T extends core::num>(lowered final self::ET2<self::ET2|setter::T> /* = self::ET2|setter::T */ #this, covariant-by-declaration core::int x) → void {}
|
||||
static extension-type-member method ET2|get#setter<T extends core::num>(lowered final self::ET2<self::ET2|get#setter::T>% /* = self::ET2|get#setter::T */ #this) → (core::int) → void
|
||||
return (core::int x) → void => self::ET2|setter<self::ET2|get#setter::T>(#this, x);
|
||||
static extension-type-member method ET3|constructor#(core::num id) → self::ET3 /* = core::num */ {
|
||||
lowered final self::ET3 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET3|constructor#_#new#tearOff(core::num id) → self::ET3 /* = core::num */
|
||||
return self::ET3|constructor#(id);
|
||||
static extension-type-member method ET3|+(lowered final self::ET3 /* = core::num */ #this, covariant-by-declaration core::int other) → core::int
|
||||
return other.{core::num::+}((#this as{Unchecked} core::num).{core::num::floor}(){() → core::int}){(core::num) → core::int};
|
||||
static extension-type-member method ET4|constructor#(covariant-by-declaration core::num id) → self::ET4 /* = core::num */ {
|
||||
lowered final self::ET4 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET4|constructor#_#new#tearOff(core::num id) → self::ET4 /* = core::num */
|
||||
return self::ET4|constructor#(id);
|
||||
static extension-type-member method ET5|constructor#(core::num id) → self::ET5 /* = core::num */ {
|
||||
lowered final self::ET5 /* = core::num */ #this = id;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET5|constructor#_#new#tearOff(core::num id) → self::ET5 /* = core::num */
|
||||
return self::ET5|constructor#(id);
|
|
@ -18,9 +18,10 @@ library;
|
|||
// extension type E3(final String foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:33: Error: Representation fields can't have modifiers.
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E4(covariant num foo) {} // Error.
|
||||
// ^^^
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:9:19: Error: Can't have modifier 'const' here.
|
||||
// Try removing 'const'.
|
||||
|
@ -31,6 +32,11 @@ library;
|
|||
// extension type E5(const bool foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:42: Error: Representation fields can't have modifiers.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^
|
||||
|
@ -105,13 +111,13 @@ library;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E2(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -135,8 +141,8 @@ extension type E6(core::double foo) {
|
|||
constructor • = self::E6|constructor#;
|
||||
constructor tearoff • = self::E6|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E7(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E7(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E7|constructor#;
|
||||
constructor tearoff • = self::E7|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -201,17 +207,17 @@ extension type E18(core::double foo) {
|
|||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E1|constructor#(invalid-type foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(dynamic foo) → self::E1 /* = dynamic */
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(invalid-type foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static extension-type-member method E2|constructor#(final dynamic foo) → self::E2 /* = dynamic */ {
|
||||
lowered final self::E2 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E2|constructor#(final invalid-type foo) → self::E2 /* = invalid-type */ {
|
||||
lowered final self::E2 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(dynamic foo) → self::E2 /* = dynamic */
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(invalid-type foo) → self::E2 /* = invalid-type */
|
||||
return self::E2|constructor#(foo);
|
||||
static extension-type-member method E3|constructor#(final core::String foo) → self::E3 /* = core::String */ {
|
||||
lowered final self::E3 /* = core::String */ #this = foo;
|
||||
|
@ -237,11 +243,11 @@ static extension-type-member method E6|constructor#(covariant-by-declaration fin
|
|||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E7|constructor#(invalid-type foo) → self::E7 /* = invalid-type */ {
|
||||
lowered final self::E7 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(dynamic foo) → self::E7 /* = dynamic */
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(invalid-type foo) → self::E7 /* = invalid-type */
|
||||
return self::E7|constructor#(foo);
|
||||
static extension-type-member method E8|constructor#() → self::E8 /* = invalid-type */ {
|
||||
lowered final self::E8 /* = invalid-type */ #this;
|
||||
|
|
|
@ -18,9 +18,10 @@ library;
|
|||
// extension type E3(final String foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:33: Error: Representation fields can't have modifiers.
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E4(covariant num foo) {} // Error.
|
||||
// ^^^
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:9:19: Error: Can't have modifier 'const' here.
|
||||
// Try removing 'const'.
|
||||
|
@ -31,6 +32,11 @@ library;
|
|||
// extension type E5(const bool foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:42: Error: Representation fields can't have modifiers.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^
|
||||
|
@ -105,13 +111,13 @@ library;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E2(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -135,8 +141,8 @@ extension type E6(core::double foo) {
|
|||
constructor • = self::E6|constructor#;
|
||||
constructor tearoff • = self::E6|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E7(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E7(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E7|constructor#;
|
||||
constructor tearoff • = self::E7|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -201,17 +207,17 @@ extension type E18(core::double foo) {
|
|||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E1|constructor#(invalid-type foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(dynamic foo) → self::E1 /* = dynamic */
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(invalid-type foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static extension-type-member method E2|constructor#(final dynamic foo) → self::E2 /* = dynamic */ {
|
||||
lowered final self::E2 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E2|constructor#(final invalid-type foo) → self::E2 /* = invalid-type */ {
|
||||
lowered final self::E2 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(dynamic foo) → self::E2 /* = dynamic */
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(invalid-type foo) → self::E2 /* = invalid-type */
|
||||
return self::E2|constructor#(foo);
|
||||
static extension-type-member method E3|constructor#(final core::String foo) → self::E3 /* = core::String */ {
|
||||
lowered final self::E3 /* = core::String */ #this = foo;
|
||||
|
@ -237,11 +243,11 @@ static extension-type-member method E6|constructor#(covariant-by-declaration fin
|
|||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E7|constructor#(invalid-type foo) → self::E7 /* = invalid-type */ {
|
||||
lowered final self::E7 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(dynamic foo) → self::E7 /* = dynamic */
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(invalid-type foo) → self::E7 /* = invalid-type */
|
||||
return self::E7|constructor#(foo);
|
||||
static extension-type-member method E8|constructor#() → self::E8 /* = invalid-type */ {
|
||||
lowered final self::E8 /* = invalid-type */ #this;
|
||||
|
|
|
@ -18,9 +18,10 @@ library;
|
|||
// extension type E3(final String foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:33: Error: Representation fields can't have modifiers.
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E4(covariant num foo) {} // Error.
|
||||
// ^^^
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:9:19: Error: Can't have modifier 'const' here.
|
||||
// Try removing 'const'.
|
||||
|
@ -31,6 +32,11 @@ library;
|
|||
// extension type E5(const bool foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:42: Error: Representation fields can't have modifiers.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^
|
||||
|
@ -105,13 +111,13 @@ library;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E2(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -135,8 +141,8 @@ extension type E6(core::double foo) {
|
|||
constructor • = self::E6|constructor#;
|
||||
constructor tearoff • = self::E6|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E7(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E7(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E7|constructor#;
|
||||
constructor tearoff • = self::E7|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -201,17 +207,17 @@ extension type E18(core::double foo) {
|
|||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E1|constructor#(invalid-type foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(dynamic foo) → self::E1 /* = dynamic */
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(invalid-type foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static extension-type-member method E2|constructor#(final dynamic foo) → self::E2 /* = dynamic */ {
|
||||
lowered final self::E2 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E2|constructor#(final invalid-type foo) → self::E2 /* = invalid-type */ {
|
||||
lowered final self::E2 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(dynamic foo) → self::E2 /* = dynamic */
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(invalid-type foo) → self::E2 /* = invalid-type */
|
||||
return self::E2|constructor#(foo);
|
||||
static extension-type-member method E3|constructor#(final core::String foo) → self::E3 /* = core::String */ {
|
||||
lowered final self::E3 /* = core::String */ #this = foo;
|
||||
|
@ -237,11 +243,11 @@ static extension-type-member method E6|constructor#(covariant-by-declaration fin
|
|||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E7|constructor#(invalid-type foo) → self::E7 /* = invalid-type */ {
|
||||
lowered final self::E7 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(dynamic foo) → self::E7 /* = dynamic */
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(invalid-type foo) → self::E7 /* = invalid-type */
|
||||
return self::E7|constructor#(foo);
|
||||
static extension-type-member method E8|constructor#() → self::E8 /* = invalid-type */ {
|
||||
lowered final self::E8 /* = invalid-type */ #this;
|
||||
|
|
|
@ -18,9 +18,10 @@ library;
|
|||
// extension type E3(final String foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:33: Error: Representation fields can't have modifiers.
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E4(covariant num foo) {} // Error.
|
||||
// ^^^
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:9:19: Error: Can't have modifier 'const' here.
|
||||
// Try removing 'const'.
|
||||
|
@ -31,6 +32,11 @@ library;
|
|||
// extension type E5(const bool foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:42: Error: Representation fields can't have modifiers.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^
|
||||
|
@ -105,13 +111,13 @@ library;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E2(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -135,8 +141,8 @@ extension type E6(core::double foo) {
|
|||
constructor • = self::E6|constructor#;
|
||||
constructor tearoff • = self::E6|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E7(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E7(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E7|constructor#;
|
||||
constructor tearoff • = self::E7|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -201,17 +207,17 @@ extension type E18(core::double foo) {
|
|||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E1|constructor#(invalid-type foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(dynamic foo) → self::E1 /* = dynamic */
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(invalid-type foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static extension-type-member method E2|constructor#(final dynamic foo) → self::E2 /* = dynamic */ {
|
||||
lowered final self::E2 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E2|constructor#(final invalid-type foo) → self::E2 /* = invalid-type */ {
|
||||
lowered final self::E2 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(dynamic foo) → self::E2 /* = dynamic */
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(invalid-type foo) → self::E2 /* = invalid-type */
|
||||
return self::E2|constructor#(foo);
|
||||
static extension-type-member method E3|constructor#(final core::String foo) → self::E3 /* = core::String */ {
|
||||
lowered final self::E3 /* = core::String */ #this = foo;
|
||||
|
@ -237,11 +243,11 @@ static extension-type-member method E6|constructor#(covariant-by-declaration fin
|
|||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E7|constructor#(invalid-type foo) → self::E7 /* = invalid-type */ {
|
||||
lowered final self::E7 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(dynamic foo) → self::E7 /* = dynamic */
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(invalid-type foo) → self::E7 /* = invalid-type */
|
||||
return self::E7|constructor#(foo);
|
||||
static extension-type-member method E8|constructor#() → self::E8 /* = invalid-type */ {
|
||||
lowered final self::E8 /* = invalid-type */ #this;
|
||||
|
|
|
@ -18,9 +18,10 @@ library;
|
|||
// extension type E3(final String foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:33: Error: Representation fields can't have modifiers.
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E4(covariant num foo) {} // Error.
|
||||
// ^^^
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:9:19: Error: Can't have modifier 'const' here.
|
||||
// Try removing 'const'.
|
||||
|
@ -31,6 +32,11 @@ library;
|
|||
// extension type E5(const bool foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:42: Error: Representation fields can't have modifiers.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^
|
||||
|
@ -105,13 +111,13 @@ library;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E2(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -135,8 +141,8 @@ extension type E6(core::double foo) {
|
|||
constructor • = self::E6|constructor#;
|
||||
constructor tearoff • = self::E6|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E7(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E7(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E7|constructor#;
|
||||
constructor tearoff • = self::E7|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -201,13 +207,13 @@ extension type E18(core::double foo) {
|
|||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */
|
||||
static extension-type-member method E1|constructor#(invalid-type foo) → self::E1 /* = invalid-type */
|
||||
;
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(dynamic foo) → self::E1 /* = dynamic */
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(invalid-type foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static extension-type-member method E2|constructor#(final dynamic foo) → self::E2 /* = dynamic */
|
||||
static extension-type-member method E2|constructor#(final invalid-type foo) → self::E2 /* = invalid-type */
|
||||
;
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(dynamic foo) → self::E2 /* = dynamic */
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(invalid-type foo) → self::E2 /* = invalid-type */
|
||||
return self::E2|constructor#(foo);
|
||||
static extension-type-member method E3|constructor#(final core::String foo) → self::E3 /* = core::String */
|
||||
;
|
||||
|
@ -225,9 +231,9 @@ static extension-type-member method E6|constructor#_#new#tearOff(core::double fo
|
|||
return self::E6|constructor#(foo);
|
||||
static extension-type-member method E6|constructor#(covariant-by-declaration final core::double foo) → self::E6 /* = core::double */
|
||||
;
|
||||
static extension-type-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */
|
||||
static extension-type-member method E7|constructor#(invalid-type foo) → self::E7 /* = invalid-type */
|
||||
;
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(dynamic foo) → self::E7 /* = dynamic */
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(invalid-type foo) → self::E7 /* = invalid-type */
|
||||
return self::E7|constructor#(foo);
|
||||
static extension-type-member method E8|constructor#() → self::E8 /* = invalid-type */
|
||||
;
|
||||
|
|
|
@ -18,9 +18,10 @@ library;
|
|||
// extension type E3(final String foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:33: Error: Representation fields can't have modifiers.
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:8:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E4(covariant num foo) {} // Error.
|
||||
// ^^^
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:9:19: Error: Can't have modifier 'const' here.
|
||||
// Try removing 'const'.
|
||||
|
@ -31,6 +32,11 @@ library;
|
|||
// extension type E5(const bool foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:19: Error: Can't have modifier 'covariant' in a primary constructor.
|
||||
// Try removing 'covariant'.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:10:42: Error: Representation fields can't have modifiers.
|
||||
// extension type E6(covariant final double foo) {} // Error.
|
||||
// ^^^
|
||||
|
@ -105,13 +111,13 @@ library;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E2(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -135,8 +141,8 @@ extension type E6(core::double foo) {
|
|||
constructor • = self::E6|constructor#;
|
||||
constructor tearoff • = self::E6|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E7(dynamic foo) {
|
||||
abstract extension-type-member representation-field get foo() → dynamic;
|
||||
extension type E7(invalid-type foo) {
|
||||
abstract extension-type-member representation-field get foo() → invalid-type;
|
||||
constructor • = self::E7|constructor#;
|
||||
constructor tearoff • = self::E7|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -201,17 +207,17 @@ extension type E18(core::double foo) {
|
|||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E1|constructor#(invalid-type foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(dynamic foo) → self::E1 /* = dynamic */
|
||||
static extension-type-member method E1|constructor#_#new#tearOff(invalid-type foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static extension-type-member method E2|constructor#(final dynamic foo) → self::E2 /* = dynamic */ {
|
||||
lowered final self::E2 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E2|constructor#(final invalid-type foo) → self::E2 /* = invalid-type */ {
|
||||
lowered final self::E2 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(dynamic foo) → self::E2 /* = dynamic */
|
||||
static extension-type-member method E2|constructor#_#new#tearOff(invalid-type foo) → self::E2 /* = invalid-type */
|
||||
return self::E2|constructor#(foo);
|
||||
static extension-type-member method E3|constructor#(final core::String foo) → self::E3 /* = core::String */ {
|
||||
lowered final self::E3 /* = core::String */ #this = foo;
|
||||
|
@ -237,11 +243,11 @@ static extension-type-member method E6|constructor#(covariant-by-declaration fin
|
|||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
static extension-type-member method E7|constructor#(invalid-type foo) → self::E7 /* = invalid-type */ {
|
||||
lowered final self::E7 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(dynamic foo) → self::E7 /* = dynamic */
|
||||
static extension-type-member method E7|constructor#_#new#tearOff(invalid-type foo) → self::E7 /* = invalid-type */
|
||||
return self::E7|constructor#(foo);
|
||||
static extension-type-member method E8|constructor#() → self::E8 /* = invalid-type */ {
|
||||
lowered final self::E8 /* = invalid-type */ #this;
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by b
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
extension type ET1(num id) {
|
||||
void method(covariant int i) {}
|
||||
// ^^^^^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE
|
||||
// [cfe] Can't have modifier 'covariant' in an extension type.
|
||||
}
|
||||
|
||||
extension type ET2<T extends num>(T id) {
|
||||
void setter(covariant int x) {}
|
||||
// ^^^^^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE
|
||||
// [cfe] Can't have modifier 'covariant' in an extension type.
|
||||
}
|
||||
|
||||
extension type ET3(num id) {
|
||||
int operator +(covariant int other) => other + id.floor();
|
||||
// ^^^^^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE
|
||||
// [cfe] Can't have modifier 'covariant' in an extension type.
|
||||
}
|
||||
|
||||
extension type ET4(covariant num id) {}
|
||||
// ^^^^^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR
|
||||
// [cfe] Can't have modifier 'covariant' in a primary constructor.
|
|
@ -20,66 +20,70 @@
|
|||
extension type E00(int) {}
|
||||
// ^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_TYPE
|
||||
// ^
|
||||
// [cfe] unspecified
|
||||
// [cfe] Expected a representation type.
|
||||
|
||||
extension type E01(int x,) {}
|
||||
// ^
|
||||
// [analyzer] unspecified
|
||||
// [cfe] unspecified
|
||||
// [analyzer] SYNTACTIC_ERROR.REPRESENTATION_FIELD_TRAILING_COMMA
|
||||
// [cfe] The representation field can't have a trailing comma.
|
||||
|
||||
extension type E02(final int x) {}
|
||||
// ^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.REPRESENTATION_FIELD_MODIFIER
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Representation fields can't have modifiers.
|
||||
|
||||
extension type E03(var x) {}
|
||||
// ^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_TYPE
|
||||
// [analyzer] SYNTACTIC_ERROR.REPRESENTATION_FIELD_MODIFIER
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Expected a representation type.
|
||||
|
||||
extension type E04(final x) {}
|
||||
// ^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_TYPE
|
||||
// [analyzer] SYNTACTIC_ERROR.REPRESENTATION_FIELD_MODIFIER
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Expected a representation type.
|
||||
// [cfe] Representation fields can't have modifiers.
|
||||
|
||||
extension type E05(covariant int x) {}
|
||||
// ^^^^^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER
|
||||
// [cfe] unspecified
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR
|
||||
// [cfe] Can't have modifier 'covariant' in a primary constructor.
|
||||
|
||||
extension type E06(required int x) {}
|
||||
// ^^^^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER
|
||||
// [cfe] unspecified
|
||||
// [cfe] Can't have modifier 'required' here.
|
||||
|
||||
extension type E07(int this.x) {} // Initializing formal.
|
||||
// ^^^^^^
|
||||
// [analyzer] unspecified
|
||||
// [cfe] unspecified
|
||||
// ^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
|
||||
extension type E08(this.x) {} // Initializing formal.
|
||||
// ^^^^^^
|
||||
// [analyzer] unspecified
|
||||
// [cfe] unspecified
|
||||
// ^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// ^
|
||||
// [cfe] Expected a representation type.
|
||||
|
||||
extension type E09(int super.x) implements E {} // Constructor super-parameter.
|
||||
// ^^^^^^^
|
||||
// [analyzer] unspecified
|
||||
// [cfe] unspecified
|
||||
// ^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// ^
|
||||
// [cfe] Extension type constructors can't declare super formal parameters.
|
||||
|
||||
extension type E10(super.x) implements E {} // Constructor super-parameter.
|
||||
// ^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// ^^^^^^^
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Expected a representation type.
|
||||
// [cfe] Extension type constructors can't declare super formal parameters.
|
||||
|
||||
extension type E11(int x()) {} // Old-style function parameter syntax.
|
||||
// ^^^^^^^
|
||||
// [analyzer] unspecified
|
||||
// [cfe] unspecified
|
||||
// ^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
|
||||
// The "primary parameter" declares a "field",
|
||||
// but still does not accept field modifiers or initializers.
|
||||
|
@ -87,94 +91,109 @@ extension type E11(int x()) {} // Old-style function parameter syntax.
|
|||
extension type E12(late int x) {}
|
||||
// ^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER
|
||||
// [cfe] unspecified
|
||||
// [cfe] Can't have modifier 'late' here.
|
||||
|
||||
extension type E13(int x = 0) {}
|
||||
// ^^^
|
||||
// [analyzer] unspecified
|
||||
// [cfe] unspecified
|
||||
// ^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.NAMED_PARAMETER_OUTSIDE_GROUP
|
||||
// [cfe] Non-optional parameters can't have a default value.
|
||||
|
||||
extension type E14(static int x) {}
|
||||
// ^^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER
|
||||
// [cfe] unspecified
|
||||
// [cfe] Can't have modifier 'static' here.
|
||||
|
||||
extension type const E15(const int x) {}
|
||||
// ^^^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER
|
||||
// [cfe] unspecified
|
||||
// [cfe] Can't have modifier 'const' here.
|
||||
// ^
|
||||
// [cfe] Representation fields can't have modifiers.
|
||||
|
||||
// Precisely one parameter is allowed and required.
|
||||
|
||||
extension type E16() {}
|
||||
// ^
|
||||
// [cfe] Expected a representation field.
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// [cfe] unspecified
|
||||
|
||||
extension type E17(int x, String y) {}
|
||||
// ^
|
||||
// [cfe] Each extension type should have exactly one representation field.
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.MULTIPLE_REPRESENTATION_FIELDS
|
||||
// [cfe] unspecified
|
||||
|
||||
extension type E18(int x, [String y = "2"]) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.MULTIPLE_REPRESENTATION_FIELDS
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Extension type declarations can't have optional parameters.
|
||||
|
||||
extension type E19(int x, {required String y}) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.MULTIPLE_REPRESENTATION_FIELDS
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Extension type declarations can't have named parameters.
|
||||
|
||||
extension type E20(int x, {String y = "2"}) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.MULTIPLE_REPRESENTATION_FIELDS
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Extension type declarations can't have named parameters.
|
||||
|
||||
extension type E21([int x = 0]) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Extension type declarations can't have optional parameters.
|
||||
|
||||
extension type E22([int x = 0, int y = 0]) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Extension type declarations can't have optional parameters.
|
||||
|
||||
extension type E23({required int x}) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Extension type declarations can't have named parameters.
|
||||
|
||||
extension type E24({int x = 0}) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Extension type declarations can't have named parameters.
|
||||
|
||||
extension type E25({int x = 0, int y = 0}) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_FIELD
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Extension type declarations can't have named parameters.
|
||||
|
||||
// Annotations are allowed, but only at the start.
|
||||
|
||||
extension type E26(@anno int) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_TYPE
|
||||
// ^
|
||||
// [cfe] unspecified
|
||||
// ^
|
||||
// [cfe] Expected a representation type.
|
||||
|
||||
extension type E27(int @anno x) {}
|
||||
// ^^^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_REPRESENTATION_TYPE
|
||||
// [cfe] Expected a representation type.
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
|
||||
// [cfe] unspecified
|
||||
// [cfe] Expected ')' before this.
|
||||
|
||||
extension type E28(int x @anno) {}
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
|
||||
// [cfe] unspecified
|
||||
// [cfe] Expected ')' before this.
|
||||
|
||||
|
||||
// Helpers
|
||||
|
|
Loading…
Reference in a new issue