[cfe] Report an error on optional positional or named parameters in extension type declarations
Part of https://github.com/dart-lang/sdk/issues/49731 Change-Id: I49e813f9573b2b66950e8aae572591b65b62e2ec Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331260 Commit-Queue: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
committed by
Commit Queue
parent
379f8cac14
commit
0e2ed5ab7a
@@ -10365,6 +10365,16 @@ Message _withArgumentsNamedMixinOverride(String name, String name2) {
|
||||
arguments: {'name': name, 'name2': name2});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codeNamedParametersInExtensionTypeDeclaration =
|
||||
messageNamedParametersInExtensionTypeDeclaration;
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const MessageCode messageNamedParametersInExtensionTypeDeclaration =
|
||||
const MessageCode("NamedParametersInExtensionTypeDeclaration",
|
||||
problemMessage:
|
||||
r"""Extension type declarations can't have named parameters.""");
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codeNativeClauseShouldBeAnnotation =
|
||||
messageNativeClauseShouldBeAnnotation;
|
||||
@@ -11593,6 +11603,16 @@ const MessageCode messageOperatorWithTypeParameters = const MessageCode(
|
||||
r"""Types parameters aren't allowed when defining an operator.""",
|
||||
correctionMessage: r"""Try removing the type parameters.""");
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codeOptionalParametersInExtensionTypeDeclaration =
|
||||
messageOptionalParametersInExtensionTypeDeclaration;
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const MessageCode messageOptionalParametersInExtensionTypeDeclaration =
|
||||
const MessageCode("OptionalParametersInExtensionTypeDeclaration",
|
||||
problemMessage:
|
||||
r"""Extension type declarations can't have optional parameters.""");
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<
|
||||
Message Function(
|
||||
|
||||
@@ -136,13 +136,18 @@ class Modifier {
|
||||
/// Method [maskContainsActualModifiers] returns `true` if the mask has any of
|
||||
/// the actual modifier bits set, and `false` otherwise.
|
||||
static bool maskContainsActualModifiers(int mask) {
|
||||
mask &= ~(1 << mixinDeclarationMask);
|
||||
mask &= ~(1 << hasInitializerMask);
|
||||
mask &= ~(1 << initializingFormalMask);
|
||||
mask &= ~(1 << declaresConstConstructorMask);
|
||||
mask &= ~(1 << superInitializingFormalMask);
|
||||
mask &= ~(1 << varMask);
|
||||
mask &= ~(mixinDeclarationMask |
|
||||
hasInitializerMask |
|
||||
initializingFormalMask |
|
||||
declaresConstConstructorMask |
|
||||
superInitializingFormalMask |
|
||||
varMask);
|
||||
|
||||
return mask != 0;
|
||||
}
|
||||
|
||||
/// Sets the bit in [mask] corresponding to [requiredMask] to 0.
|
||||
static int removeRequiredMask(int mask) {
|
||||
return mask & ~requiredMask;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1627,14 +1627,9 @@ class OutlineBuilder extends StackListenerImpl {
|
||||
bool inExtensionType =
|
||||
declarationContext == DeclarationContext.ExtensionType;
|
||||
if (formals != null) {
|
||||
if (inExtensionType && formals.isEmpty) {
|
||||
libraryBuilder.addProblem(
|
||||
messageExpectedRepresentationField, charOffset, 1, uri);
|
||||
}
|
||||
if (inExtensionType && formals.length > 1) {
|
||||
libraryBuilder.addProblem(
|
||||
messageMultipleRepresentationFields, charOffset, 1, uri);
|
||||
}
|
||||
int requiredPositionalCount = 0;
|
||||
int? firstNamedParameterOffset;
|
||||
int? firstOptionalPositionalParameterOffset;
|
||||
for (int i = 0; i < formals.length; i++) {
|
||||
FormalParameterBuilder formal = formals[i];
|
||||
if (inExtensionType && formal.type is ImplicitTypeBuilder) {
|
||||
@@ -1642,10 +1637,21 @@ class OutlineBuilder extends StackListenerImpl {
|
||||
formal.charOffset, formal.name.length, formal.fileUri);
|
||||
}
|
||||
if (inExtensionType &&
|
||||
Modifier.maskContainsActualModifiers(formal.modifiers)) {
|
||||
Modifier.maskContainsActualModifiers(
|
||||
Modifier.removeRequiredMask(formal.modifiers))) {
|
||||
libraryBuilder.addProblem(messageRepresentationFieldModifier,
|
||||
formal.charOffset, formal.name.length, formal.fileUri);
|
||||
}
|
||||
if (formal.isPositional) {
|
||||
if (formal.isOptionalPositional) {
|
||||
firstOptionalPositionalParameterOffset = formal.charOffset;
|
||||
} else {
|
||||
requiredPositionalCount++;
|
||||
}
|
||||
}
|
||||
if (formal.isNamed) {
|
||||
firstNamedParameterOffset = formal.charOffset;
|
||||
}
|
||||
libraryBuilder.addPrimaryConstructorField(
|
||||
// TODO(johnniwinther): Support annotations on annotations on fields
|
||||
// defined through a primary constructor. This is not needed for
|
||||
@@ -1657,6 +1663,27 @@ class OutlineBuilder extends StackListenerImpl {
|
||||
charOffset: formal.charOffset);
|
||||
formals[i] = formal.forPrimaryConstructor(libraryBuilder);
|
||||
}
|
||||
if (inExtensionType) {
|
||||
if (firstOptionalPositionalParameterOffset != null) {
|
||||
libraryBuilder.addProblem(
|
||||
messageOptionalParametersInExtensionTypeDeclaration,
|
||||
firstOptionalPositionalParameterOffset,
|
||||
1,
|
||||
uri);
|
||||
} else if (firstNamedParameterOffset != null) {
|
||||
libraryBuilder.addProblem(
|
||||
messageNamedParametersInExtensionTypeDeclaration,
|
||||
firstNamedParameterOffset,
|
||||
1,
|
||||
uri);
|
||||
} else if (requiredPositionalCount == 0) {
|
||||
libraryBuilder.addProblem(
|
||||
messageExpectedRepresentationField, charOffset, 1, uri);
|
||||
} else if (inExtensionType && formals.length > 1) {
|
||||
libraryBuilder.addProblem(
|
||||
messageMultipleRepresentationFields, charOffset, 1, uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libraryBuilder.beginNestedDeclaration(
|
||||
|
||||
@@ -378,8 +378,8 @@ FastaUsageShort/analyzerCode: Fail
|
||||
FastaUsageShort/example: Fail
|
||||
FfiAbiSpecificIntegerInvalid/analyzerCode: Fail
|
||||
FfiAbiSpecificIntegerMappingInvalid/analyzerCode: Fail
|
||||
FfiCreateOfStructOrUnion/analyzerCode: Fail
|
||||
FfiCompoundImplementsFinalizable/analyzerCode: Fail
|
||||
FfiCreateOfStructOrUnion/analyzerCode: Fail
|
||||
FfiDartTypeMismatch/analyzerCode: Fail
|
||||
FfiEmptyStruct/analyzerCode: Fail
|
||||
FfiExceptionalReturnNull/analyzerCode: Fail
|
||||
@@ -395,6 +395,7 @@ FfiFieldNoAnnotation/analyzerCode: Fail
|
||||
FfiFieldNull/analyzerCode: Fail
|
||||
FfiLeafCallMustNotReturnHandle/analyzerCode: Fail
|
||||
FfiLeafCallMustNotTakeHandle/analyzerCode: Fail
|
||||
FfiNativeCallableListenerReturnVoid/analyzerCode: Fail
|
||||
FfiNativeMustBeExternal/analyzerCode: Fail
|
||||
FfiNativeOnlyNativeFieldWrapperClassCanBePointer/analyzerCode: Fail
|
||||
FfiNativeUnexpectedNumberOfParameters/analyzerCode: Fail
|
||||
@@ -402,7 +403,6 @@ FfiNativeUnexpectedNumberOfParametersWithReceiver/analyzerCode: Fail
|
||||
FfiNotStatic/analyzerCode: Fail
|
||||
FfiPackedAnnotation/analyzerCode: Fail
|
||||
FfiPackedAnnotationAlignment/analyzerCode: Fail
|
||||
FfiNativeCallableListenerReturnVoid/analyzerCode: Fail
|
||||
FfiSizeAnnotation/analyzerCode: Fail
|
||||
FfiSizeAnnotationDimensions/analyzerCode: Fail
|
||||
FfiStructAnnotation/analyzerCode: Fail
|
||||
@@ -616,10 +616,10 @@ JsInteropExportMemberCollision/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropExportMemberCollision/example: Fail # Web compiler specific
|
||||
JsInteropExportNoExportableMembers/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropExportNoExportableMembers/example: Fail # Web compiler specific
|
||||
JsInteropExtensionTypeNotInterop/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropExtensionTypeNotInterop/example: Fail # Web compiler specific
|
||||
JsInteropExtensionTypeMemberNotInterop/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropExtensionTypeMemberNotInterop/example: Fail # Web compiler specific
|
||||
JsInteropExtensionTypeNotInterop/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropExtensionTypeNotInterop/example: Fail # Web compiler specific
|
||||
JsInteropExtensionTypeUsedWithWrongJsAnnotation/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropExtensionTypeUsedWithWrongJsAnnotation/example: Fail # Web compiler specific
|
||||
JsInteropExternalExtensionMemberOnTypeInvalid/analyzerCode: Fail # Web compiler specific
|
||||
@@ -628,6 +628,8 @@ JsInteropExternalExtensionMemberWithStaticDisallowed/analyzerCode: Fail # Web co
|
||||
JsInteropExternalExtensionMemberWithStaticDisallowed/example: Fail # Web compiler specific
|
||||
JsInteropExternalMemberNotJSAnnotated/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropExternalMemberNotJSAnnotated/example: Fail # Web compiler specific
|
||||
JsInteropFunctionToJSRequiresStaticType/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropFunctionToJSRequiresStaticType/example: Fail # Web compiler specific
|
||||
JsInteropInvalidStaticClassMemberName/analyzerCode: Fail
|
||||
JsInteropInvalidStaticClassMemberName/example: Fail
|
||||
JsInteropJSClassExtendsDartClass/analyzerCode: Fail # Web compiler specific
|
||||
@@ -642,12 +644,12 @@ JsInteropNonExternalMember/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropNonExternalMember/example: Fail # Web compiler specific
|
||||
JsInteropNonStaticWithStaticInteropSupertype/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropNonStaticWithStaticInteropSupertype/example: Fail # Web compiler specific
|
||||
JsInteropObjectLiteralConstructorPositionalParameters/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropObjectLiteralConstructorPositionalParameters/example: Fail # Web compiler specific
|
||||
JsInteropOperatorCannotBeRenamed/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropOperatorCannotBeRenamed/example: Fail # Web compiler specific
|
||||
JsInteropOperatorsNotSupported/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropOperatorsNotSupported/example: Fail # Web compiler specific
|
||||
JsInteropObjectLiteralConstructorPositionalParameters/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropObjectLiteralConstructorPositionalParameters/example: Fail # Web compiler specific
|
||||
JsInteropStaticInteropExternalMemberWithInvalidTypeParameters/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropStaticInteropExternalMemberWithInvalidTypeParameters/example: Fail # Web compiler specific
|
||||
JsInteropStaticInteropExternalTypeViolation/analyzerCode: Fail # Web compiler specific
|
||||
@@ -680,8 +682,6 @@ JsInteropStaticInteropWithInvalidJsTypesSupertype/analyzerCode: Fail # Web compi
|
||||
JsInteropStaticInteropWithInvalidJsTypesSupertype/example: Fail # Web compiler specific
|
||||
JsInteropStaticInteropWithNonStaticSupertype/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropStaticInteropWithNonStaticSupertype/example: Fail # Web compiler specific
|
||||
JsInteropFunctionToJSRequiresStaticType/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropFunctionToJSRequiresStaticType/example: Fail # Web compiler specific
|
||||
JsInteropStrictModeForbiddenLibrary/analyzerCode: Fail # Web compiler specific
|
||||
JsInteropStrictModeForbiddenLibrary/example: Fail # Web compiler specific
|
||||
LanguageVersionInvalidInDotPackages/analyzerCode: Fail
|
||||
@@ -748,6 +748,7 @@ NameNotFoundInRecordNameGet/example: Fail
|
||||
NamedFunctionExpression/example: Fail
|
||||
NamedMixinOverride/analyzerCode: Fail
|
||||
NamedMixinOverride/example: Fail
|
||||
NamedParametersInExtensionTypeDeclaration/analyzerCode: Fail
|
||||
NativeClauseShouldBeAnnotation/example: Fail
|
||||
NeverReachableSwitchDefaultError/analyzerCode: Fail
|
||||
NeverReachableSwitchDefaultError/example: Fail
|
||||
@@ -868,6 +869,7 @@ OperatorParameterMismatch1/example: Fail
|
||||
OperatorParameterMismatch2/example: Fail
|
||||
OperatorWithOptionalFormals/analyzerCode: Fail
|
||||
OperatorWithOptionalFormals/example: Fail
|
||||
OptionalParametersInExtensionTypeDeclaration/analyzerCode: Fail
|
||||
OptionalSuperParameterWithoutInitializer/analyzerCode: Fail
|
||||
OptionalSuperParameterWithoutInitializer/example: Fail
|
||||
OverrideFewerNamedArguments/example: Fail
|
||||
|
||||
@@ -7468,3 +7468,15 @@ AwaitOfExtensionTypeNotFuture:
|
||||
script: |
|
||||
extension type E(num foo) { test(E e) async { await e; } }
|
||||
analyzerCode: AWAIT_OF_EXTENSION_TYPE_NOT_FUTURE
|
||||
|
||||
NamedParametersInExtensionTypeDeclaration:
|
||||
problemMessage: "Extension type declarations can't have named parameters."
|
||||
experiments: inline-class
|
||||
script: |
|
||||
extension type E(int foo, {dynamic bar}) {}
|
||||
|
||||
OptionalParametersInExtensionTypeDeclaration:
|
||||
problemMessage: "Extension type declarations can't have optional parameters."
|
||||
experiments: inline-class
|
||||
script: |
|
||||
extension type E(int foo, [dynamic bar]) {}
|
||||
|
||||
@@ -6,10 +6,6 @@ library;
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:15:30: Error: Representation fields can't have modifiers.
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:12:26: Error: Couldn't find constructor 'Foo.unresolved'.
|
||||
// Foo.erroneous() : this.unresolved(); // Error
|
||||
// ^^^^^^^^^^
|
||||
|
||||
@@ -6,10 +6,6 @@ library;
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:15:30: Error: Representation fields can't have modifiers.
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:12:26: Error: Couldn't find constructor 'Foo.unresolved'.
|
||||
// Foo.erroneous() : this.unresolved(); // Error
|
||||
// ^^^^^^^^^^
|
||||
|
||||
@@ -6,10 +6,6 @@ library;
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:15:30: Error: Representation fields can't have modifiers.
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:12:26: Error: Couldn't find constructor 'Foo.unresolved'.
|
||||
// Foo.erroneous() : this.unresolved(); // Error
|
||||
// ^^^^^^^^^^
|
||||
|
||||
@@ -6,10 +6,6 @@ library;
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:15:30: Error: Representation fields can't have modifiers.
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:12:26: Error: Couldn't find constructor 'Foo.unresolved'.
|
||||
// Foo.erroneous() : this.unresolved(); // Error
|
||||
// ^^^^^^^^^^
|
||||
|
||||
@@ -6,10 +6,6 @@ library;
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:15:30: Error: Representation fields can't have modifiers.
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@ library;
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:15:30: Error: Representation fields can't have modifiers.
|
||||
// extension type Bar<T>._(this.i) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue52119.dart:12:26: Error: Couldn't find constructor 'Foo.unresolved'.
|
||||
// Foo.erroneous() : this.unresolved(); // Error
|
||||
// ^^^^^^^^^^
|
||||
|
||||
@@ -17,10 +17,6 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
@@ -28,6 +24,10 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:31: Error: Can't use 'instanceField' because it is declared more than once.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
|
||||
+4
-4
@@ -17,10 +17,6 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
@@ -28,6 +24,10 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:31: Error: Can't use 'instanceField' because it is declared more than once.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
|
||||
@@ -17,10 +17,6 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
@@ -28,6 +24,10 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:31: Error: Can't use 'instanceField' because it is declared more than once.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
|
||||
@@ -17,10 +17,6 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
@@ -28,6 +24,10 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:31: Error: Can't use 'instanceField' because it is declared more than once.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
|
||||
@@ -17,10 +17,6 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
@@ -28,6 +24,10 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
||||
@@ -17,10 +17,6 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
@@ -28,6 +24,10 @@ library;
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation.dart:9:31: Error: Can't use 'instanceField' because it is declared more than once.
|
||||
// extension type Duplicate(bool instanceField, int instanceField) {} // Error
|
||||
// ^^^^^^^^^^^^^
|
||||
|
||||
@@ -14,3 +14,9 @@ extension type E9(int foo, String bar) {} // Error.
|
||||
extension type E10(num foo, bool bar, double baz) {} // Error.
|
||||
extension type E11(bool foo,) {} // Error.
|
||||
extension type E12(bool foo = false,) {} // Error.
|
||||
extension type E13([int? foo]) {} // Error.
|
||||
extension type E14({String? foo}) {} // Error.
|
||||
extension type E15({required double foo}) {} // Error.
|
||||
extension type E16(bool foo, [dynamic bar]) {} // Error.
|
||||
extension type E17(Object foo, {num? bar, String? baz}) {} // Error.
|
||||
extension type E18(double foo, {required int bar}) {} // Error.
|
||||
|
||||
+97
-2
@@ -78,6 +78,30 @@ library;
|
||||
// extension type E12(bool foo = false,) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:17:26: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E13([int? foo]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:18:29: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E14({String? foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:19:37: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E15({required double foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:20:39: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E16(bool foo, [dynamic bar]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:21:51: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E17(Object foo, {num? bar, String? baz}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:22:46: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E18(double foo, {required int bar}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
@@ -143,6 +167,40 @@ extension type E12(core::bool foo) {
|
||||
constructor • = self::E12|constructor#;
|
||||
constructor tearoff • = self::E12|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E13(core::int? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::int?;
|
||||
constructor • = self::E13|constructor#;
|
||||
constructor tearoff • = self::E13|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E14(core::String? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::String?;
|
||||
constructor • = self::E14|constructor#;
|
||||
constructor tearoff • = self::E14|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E15(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
constructor • = self::E15|constructor#;
|
||||
constructor tearoff • = self::E15|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E16(core::bool foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::bool;
|
||||
abstract inline-class-member representation-field get bar() → dynamic;
|
||||
constructor • = self::E16|constructor#;
|
||||
constructor tearoff • = self::E16|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E17(core::Object foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::Object;
|
||||
abstract inline-class-member representation-field get bar() → core::num?;
|
||||
abstract inline-class-member representation-field get baz() → core::String?;
|
||||
constructor • = self::E17|constructor#;
|
||||
constructor tearoff • = self::E17|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E18(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
abstract inline-class-member representation-field get bar() → core::int;
|
||||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -173,12 +231,12 @@ static inline-class-member method E5|constructor#(core::bool foo) → self::E5 /
|
||||
}
|
||||
static inline-class-member method E5|constructor#_#new#tearOff(core::bool foo) → self::E5 /* = core::bool */
|
||||
return self::E5|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#(covariant-by-declaration final core::double foo) → self::E6 /* = core::double */ {
|
||||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -215,7 +273,44 @@ static inline-class-member method E12|constructor#(core::bool foo = #C1) → sel
|
||||
}
|
||||
static inline-class-member method E12|constructor#_#new#tearOff(has-declared-initializer core::bool foo) → self::E12 /* = core::bool */
|
||||
return self::E12|constructor#(foo);
|
||||
static inline-class-member method E13|constructor#([core::int? foo = #C2]) → self::E13 /* = core::int? */ {
|
||||
lowered final self::E13 /* = core::int? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E13|constructor#_#new#tearOff([core::int? foo]) → self::E13 /* = core::int? */
|
||||
return self::E13|constructor#(foo);
|
||||
static inline-class-member method E14|constructor#({core::String? foo = #C2}) → self::E14 /* = core::String? */ {
|
||||
lowered final self::E14 /* = core::String? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E14|constructor#_#new#tearOff({core::String? foo}) → self::E14 /* = core::String? */
|
||||
return self::E14|constructor#(foo: foo);
|
||||
static inline-class-member method E15|constructor#({required core::double foo = #C2}) → self::E15 /* = core::double */ {
|
||||
lowered final self::E15 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E15|constructor#_#new#tearOff({required core::double foo}) → self::E15 /* = core::double */
|
||||
return self::E15|constructor#(foo: foo);
|
||||
static inline-class-member method E16|constructor#(core::bool foo, [dynamic bar = #C2]) → self::E16 /* = core::bool */ {
|
||||
lowered final self::E16 /* = core::bool */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E16|constructor#_#new#tearOff(core::bool foo, [dynamic bar]) → self::E16 /* = core::bool */
|
||||
return self::E16|constructor#(foo, bar);
|
||||
static inline-class-member method E17|constructor#(core::Object foo, {core::num? bar = #C2, core::String? baz = #C2}) → self::E17 /* = core::Object */ {
|
||||
lowered final self::E17 /* = core::Object */ #this = baz;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E17|constructor#_#new#tearOff(core::Object foo, {core::num? bar, core::String? baz}) → self::E17 /* = core::Object */
|
||||
return self::E17|constructor#(foo, bar: bar, baz: baz);
|
||||
static inline-class-member method E18|constructor#(core::double foo, {required core::int bar = #C2}) → self::E18 /* = core::double */ {
|
||||
lowered final self::E18 /* = core::double */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E18|constructor#_#new#tearOff(core::double foo, {required core::int bar}) → self::E18 /* = core::double */
|
||||
return self::E18|constructor#(foo, bar: bar);
|
||||
|
||||
constants {
|
||||
#C1 = false
|
||||
#C2 = null
|
||||
}
|
||||
|
||||
+97
-2
@@ -78,6 +78,30 @@ library;
|
||||
// extension type E12(bool foo = false,) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:17:26: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E13([int? foo]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:18:29: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E14({String? foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:19:37: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E15({required double foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:20:39: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E16(bool foo, [dynamic bar]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:21:51: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E17(Object foo, {num? bar, String? baz}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:22:46: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E18(double foo, {required int bar}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
@@ -143,6 +167,40 @@ extension type E12(core::bool foo) {
|
||||
constructor • = self::E12|constructor#;
|
||||
constructor tearoff • = self::E12|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E13(core::int? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::int?;
|
||||
constructor • = self::E13|constructor#;
|
||||
constructor tearoff • = self::E13|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E14(core::String? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::String?;
|
||||
constructor • = self::E14|constructor#;
|
||||
constructor tearoff • = self::E14|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E15(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
constructor • = self::E15|constructor#;
|
||||
constructor tearoff • = self::E15|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E16(core::bool foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::bool;
|
||||
abstract inline-class-member representation-field get bar() → dynamic;
|
||||
constructor • = self::E16|constructor#;
|
||||
constructor tearoff • = self::E16|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E17(core::Object foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::Object;
|
||||
abstract inline-class-member representation-field get bar() → core::num?;
|
||||
abstract inline-class-member representation-field get baz() → core::String?;
|
||||
constructor • = self::E17|constructor#;
|
||||
constructor tearoff • = self::E17|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E18(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
abstract inline-class-member representation-field get bar() → core::int;
|
||||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -173,12 +231,12 @@ static inline-class-member method E5|constructor#(core::bool foo) → self::E5 /
|
||||
}
|
||||
static inline-class-member method E5|constructor#_#new#tearOff(core::bool foo) → self::E5 /* = core::bool */
|
||||
return self::E5|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#(covariant-by-declaration final core::double foo) → self::E6 /* = core::double */ {
|
||||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -215,7 +273,44 @@ static inline-class-member method E12|constructor#(core::bool foo = #C1) → sel
|
||||
}
|
||||
static inline-class-member method E12|constructor#_#new#tearOff(has-declared-initializer core::bool foo) → self::E12 /* = core::bool */
|
||||
return self::E12|constructor#(foo);
|
||||
static inline-class-member method E13|constructor#([core::int? foo = #C2]) → self::E13 /* = core::int? */ {
|
||||
lowered final self::E13 /* = core::int? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E13|constructor#_#new#tearOff([core::int? foo]) → self::E13 /* = core::int? */
|
||||
return self::E13|constructor#(foo);
|
||||
static inline-class-member method E14|constructor#({core::String? foo = #C2}) → self::E14 /* = core::String? */ {
|
||||
lowered final self::E14 /* = core::String? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E14|constructor#_#new#tearOff({core::String? foo}) → self::E14 /* = core::String? */
|
||||
return self::E14|constructor#(foo: foo);
|
||||
static inline-class-member method E15|constructor#({required core::double foo = #C2}) → self::E15 /* = core::double */ {
|
||||
lowered final self::E15 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E15|constructor#_#new#tearOff({required core::double foo}) → self::E15 /* = core::double */
|
||||
return self::E15|constructor#(foo: foo);
|
||||
static inline-class-member method E16|constructor#(core::bool foo, [dynamic bar = #C2]) → self::E16 /* = core::bool */ {
|
||||
lowered final self::E16 /* = core::bool */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E16|constructor#_#new#tearOff(core::bool foo, [dynamic bar]) → self::E16 /* = core::bool */
|
||||
return self::E16|constructor#(foo, bar);
|
||||
static inline-class-member method E17|constructor#(core::Object foo, {core::num? bar = #C2, core::String? baz = #C2}) → self::E17 /* = core::Object */ {
|
||||
lowered final self::E17 /* = core::Object */ #this = baz;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E17|constructor#_#new#tearOff(core::Object foo, {core::num? bar, core::String? baz}) → self::E17 /* = core::Object */
|
||||
return self::E17|constructor#(foo, bar: bar, baz: baz);
|
||||
static inline-class-member method E18|constructor#(core::double foo, {required core::int bar = #C2}) → self::E18 /* = core::double */ {
|
||||
lowered final self::E18 /* = core::double */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E18|constructor#_#new#tearOff(core::double foo, {required core::int bar}) → self::E18 /* = core::double */
|
||||
return self::E18|constructor#(foo, bar: bar);
|
||||
|
||||
constants {
|
||||
#C1 = false
|
||||
#C2 = null
|
||||
}
|
||||
|
||||
+6
@@ -10,3 +10,9 @@ extension type E9(int foo, String bar) {}
|
||||
extension type E10(num foo, bool bar, double baz) {}
|
||||
extension type E11(bool foo,) {}
|
||||
extension type E12(bool foo = false,) {}
|
||||
extension type E13([int? foo]) {}
|
||||
extension type E14({String? foo}) {}
|
||||
extension type E15({required double foo}) {}
|
||||
extension type E16(bool foo, [dynamic bar]) {}
|
||||
extension type E17(Object foo, {num? bar, String? baz}) {}
|
||||
extension type E18(double foo, {required int bar}) {}
|
||||
|
||||
+6
@@ -2,6 +2,12 @@ extension type E1(var foo) {}
|
||||
extension type E10(num foo, bool bar, double baz) {}
|
||||
extension type E11(bool foo,) {}
|
||||
extension type E12(bool foo = false,) {}
|
||||
extension type E13([int? foo]) {}
|
||||
extension type E14({String? foo}) {}
|
||||
extension type E15({required double foo}) {}
|
||||
extension type E16(bool foo, [dynamic bar]) {}
|
||||
extension type E17(Object foo, {num? bar, String? baz}) {}
|
||||
extension type E18(double foo, {required int bar}) {}
|
||||
extension type E2(final foo) {}
|
||||
extension type E3(final String foo) {}
|
||||
extension type E4(covariant num foo) {}
|
||||
|
||||
+97
-2
@@ -78,6 +78,30 @@ library;
|
||||
// extension type E12(bool foo = false,) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:17:26: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E13([int? foo]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:18:29: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E14({String? foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:19:37: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E15({required double foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:20:39: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E16(bool foo, [dynamic bar]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:21:51: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E17(Object foo, {num? bar, String? baz}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:22:46: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E18(double foo, {required int bar}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
@@ -143,6 +167,40 @@ extension type E12(core::bool foo) {
|
||||
constructor • = self::E12|constructor#;
|
||||
constructor tearoff • = self::E12|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E13(core::int? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::int?;
|
||||
constructor • = self::E13|constructor#;
|
||||
constructor tearoff • = self::E13|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E14(core::String? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::String?;
|
||||
constructor • = self::E14|constructor#;
|
||||
constructor tearoff • = self::E14|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E15(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
constructor • = self::E15|constructor#;
|
||||
constructor tearoff • = self::E15|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E16(core::bool foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::bool;
|
||||
abstract inline-class-member representation-field get bar() → dynamic;
|
||||
constructor • = self::E16|constructor#;
|
||||
constructor tearoff • = self::E16|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E17(core::Object foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::Object;
|
||||
abstract inline-class-member representation-field get bar() → core::num?;
|
||||
abstract inline-class-member representation-field get baz() → core::String?;
|
||||
constructor • = self::E17|constructor#;
|
||||
constructor tearoff • = self::E17|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E18(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
abstract inline-class-member representation-field get bar() → core::int;
|
||||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -173,12 +231,12 @@ static inline-class-member method E5|constructor#(core::bool foo) → self::E5 /
|
||||
}
|
||||
static inline-class-member method E5|constructor#_#new#tearOff(core::bool foo) → self::E5 /* = core::bool */
|
||||
return self::E5|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#(covariant-by-declaration final core::double foo) → self::E6 /* = core::double */ {
|
||||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -215,7 +273,44 @@ static inline-class-member method E12|constructor#(core::bool foo = #C1) → sel
|
||||
}
|
||||
static inline-class-member method E12|constructor#_#new#tearOff(has-declared-initializer core::bool foo) → self::E12 /* = core::bool */
|
||||
return self::E12|constructor#(foo);
|
||||
static inline-class-member method E13|constructor#([core::int? foo = #C2]) → self::E13 /* = core::int? */ {
|
||||
lowered final self::E13 /* = core::int? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E13|constructor#_#new#tearOff([core::int? foo]) → self::E13 /* = core::int? */
|
||||
return self::E13|constructor#(foo);
|
||||
static inline-class-member method E14|constructor#({core::String? foo = #C2}) → self::E14 /* = core::String? */ {
|
||||
lowered final self::E14 /* = core::String? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E14|constructor#_#new#tearOff({core::String? foo}) → self::E14 /* = core::String? */
|
||||
return self::E14|constructor#(foo: foo);
|
||||
static inline-class-member method E15|constructor#({required core::double foo = #C2}) → self::E15 /* = core::double */ {
|
||||
lowered final self::E15 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E15|constructor#_#new#tearOff({required core::double foo}) → self::E15 /* = core::double */
|
||||
return self::E15|constructor#(foo: foo);
|
||||
static inline-class-member method E16|constructor#(core::bool foo, [dynamic bar = #C2]) → self::E16 /* = core::bool */ {
|
||||
lowered final self::E16 /* = core::bool */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E16|constructor#_#new#tearOff(core::bool foo, [dynamic bar]) → self::E16 /* = core::bool */
|
||||
return self::E16|constructor#(foo, bar);
|
||||
static inline-class-member method E17|constructor#(core::Object foo, {core::num? bar = #C2, core::String? baz = #C2}) → self::E17 /* = core::Object */ {
|
||||
lowered final self::E17 /* = core::Object */ #this = baz;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E17|constructor#_#new#tearOff(core::Object foo, {core::num? bar, core::String? baz}) → self::E17 /* = core::Object */
|
||||
return self::E17|constructor#(foo, bar: bar, baz: baz);
|
||||
static inline-class-member method E18|constructor#(core::double foo, {required core::int bar = #C2}) → self::E18 /* = core::double */ {
|
||||
lowered final self::E18 /* = core::double */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E18|constructor#_#new#tearOff(core::double foo, {required core::int bar}) → self::E18 /* = core::double */
|
||||
return self::E18|constructor#(foo, bar: bar);
|
||||
|
||||
constants {
|
||||
#C1 = false
|
||||
#C2 = null
|
||||
}
|
||||
|
||||
+97
-2
@@ -78,6 +78,30 @@ library;
|
||||
// extension type E12(bool foo = false,) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:17:26: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E13([int? foo]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:18:29: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E14({String? foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:19:37: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E15({required double foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:20:39: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E16(bool foo, [dynamic bar]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:21:51: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E17(Object foo, {num? bar, String? baz}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:22:46: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E18(double foo, {required int bar}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
@@ -143,6 +167,40 @@ extension type E12(core::bool foo) {
|
||||
constructor • = self::E12|constructor#;
|
||||
constructor tearoff • = self::E12|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E13(core::int? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::int?;
|
||||
constructor • = self::E13|constructor#;
|
||||
constructor tearoff • = self::E13|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E14(core::String? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::String?;
|
||||
constructor • = self::E14|constructor#;
|
||||
constructor tearoff • = self::E14|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E15(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
constructor • = self::E15|constructor#;
|
||||
constructor tearoff • = self::E15|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E16(core::bool foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::bool;
|
||||
abstract inline-class-member representation-field get bar() → dynamic;
|
||||
constructor • = self::E16|constructor#;
|
||||
constructor tearoff • = self::E16|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E17(core::Object foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::Object;
|
||||
abstract inline-class-member representation-field get bar() → core::num?;
|
||||
abstract inline-class-member representation-field get baz() → core::String?;
|
||||
constructor • = self::E17|constructor#;
|
||||
constructor tearoff • = self::E17|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E18(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
abstract inline-class-member representation-field get bar() → core::int;
|
||||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -173,12 +231,12 @@ static inline-class-member method E5|constructor#(core::bool foo) → self::E5 /
|
||||
}
|
||||
static inline-class-member method E5|constructor#_#new#tearOff(core::bool foo) → self::E5 /* = core::bool */
|
||||
return self::E5|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#(covariant-by-declaration final core::double foo) → self::E6 /* = core::double */ {
|
||||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -215,7 +273,44 @@ static inline-class-member method E12|constructor#(core::bool foo = #C1) → sel
|
||||
}
|
||||
static inline-class-member method E12|constructor#_#new#tearOff(has-declared-initializer core::bool foo) → self::E12 /* = core::bool */
|
||||
return self::E12|constructor#(foo);
|
||||
static inline-class-member method E13|constructor#([core::int? foo = #C2]) → self::E13 /* = core::int? */ {
|
||||
lowered final self::E13 /* = core::int? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E13|constructor#_#new#tearOff([core::int? foo]) → self::E13 /* = core::int? */
|
||||
return self::E13|constructor#(foo);
|
||||
static inline-class-member method E14|constructor#({core::String? foo = #C2}) → self::E14 /* = core::String? */ {
|
||||
lowered final self::E14 /* = core::String? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E14|constructor#_#new#tearOff({core::String? foo}) → self::E14 /* = core::String? */
|
||||
return self::E14|constructor#(foo: foo);
|
||||
static inline-class-member method E15|constructor#({required core::double foo = #C2}) → self::E15 /* = core::double */ {
|
||||
lowered final self::E15 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E15|constructor#_#new#tearOff({required core::double foo}) → self::E15 /* = core::double */
|
||||
return self::E15|constructor#(foo: foo);
|
||||
static inline-class-member method E16|constructor#(core::bool foo, [dynamic bar = #C2]) → self::E16 /* = core::bool */ {
|
||||
lowered final self::E16 /* = core::bool */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E16|constructor#_#new#tearOff(core::bool foo, [dynamic bar]) → self::E16 /* = core::bool */
|
||||
return self::E16|constructor#(foo, bar);
|
||||
static inline-class-member method E17|constructor#(core::Object foo, {core::num? bar = #C2, core::String? baz = #C2}) → self::E17 /* = core::Object */ {
|
||||
lowered final self::E17 /* = core::Object */ #this = baz;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E17|constructor#_#new#tearOff(core::Object foo, {core::num? bar, core::String? baz}) → self::E17 /* = core::Object */
|
||||
return self::E17|constructor#(foo, bar: bar, baz: baz);
|
||||
static inline-class-member method E18|constructor#(core::double foo, {required core::int bar = #C2}) → self::E18 /* = core::double */ {
|
||||
lowered final self::E18 /* = core::double */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E18|constructor#_#new#tearOff(core::double foo, {required core::int bar}) → self::E18 /* = core::double */
|
||||
return self::E18|constructor#(foo, bar: bar);
|
||||
|
||||
constants {
|
||||
#C1 = false
|
||||
#C2 = null
|
||||
}
|
||||
|
||||
+84
-2
@@ -78,6 +78,30 @@ library;
|
||||
// extension type E12(bool foo = false,) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:17:26: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E13([int? foo]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:18:29: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E14({String? foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:19:37: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E15({required double foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:20:39: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E16(bool foo, [dynamic bar]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:21:51: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E17(Object foo, {num? bar, String? baz}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:22:46: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E18(double foo, {required int bar}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
@@ -143,6 +167,40 @@ extension type E12(core::bool foo) {
|
||||
constructor • = self::E12|constructor#;
|
||||
constructor tearoff • = self::E12|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E13(core::int? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::int?;
|
||||
constructor • = self::E13|constructor#;
|
||||
constructor tearoff • = self::E13|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E14(core::String? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::String?;
|
||||
constructor • = self::E14|constructor#;
|
||||
constructor tearoff • = self::E14|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E15(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
constructor • = self::E15|constructor#;
|
||||
constructor tearoff • = self::E15|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E16(core::bool foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::bool;
|
||||
abstract inline-class-member representation-field get bar() → dynamic;
|
||||
constructor • = self::E16|constructor#;
|
||||
constructor tearoff • = self::E16|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E17(core::Object foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::Object;
|
||||
abstract inline-class-member representation-field get bar() → core::num?;
|
||||
abstract inline-class-member representation-field get baz() → core::String?;
|
||||
constructor • = self::E17|constructor#;
|
||||
constructor tearoff • = self::E17|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E18(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
abstract inline-class-member representation-field get bar() → core::int;
|
||||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */
|
||||
;
|
||||
static inline-class-member method E1|constructor#_#new#tearOff(dynamic foo) → self::E1 /* = dynamic */
|
||||
@@ -163,10 +221,10 @@ static inline-class-member method E5|constructor#(core::bool foo) → self::E5 /
|
||||
;
|
||||
static inline-class-member method E5|constructor#_#new#tearOff(core::bool foo) → self::E5 /* = core::bool */
|
||||
return self::E5|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#(covariant-by-declaration final core::double foo) → self::E6 /* = core::double */
|
||||
;
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#(covariant-by-declaration final core::double foo) → self::E6 /* = core::double */
|
||||
;
|
||||
static inline-class-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */
|
||||
;
|
||||
static inline-class-member method E7|constructor#_#new#tearOff(dynamic foo) → self::E7 /* = dynamic */
|
||||
@@ -191,3 +249,27 @@ static inline-class-member method E12|constructor#(has-declared-initializer core
|
||||
;
|
||||
static inline-class-member method E12|constructor#_#new#tearOff(has-declared-initializer core::bool foo) → self::E12 /* = core::bool */
|
||||
return self::E12|constructor#(foo);
|
||||
static inline-class-member method E13|constructor#([core::int? foo = null]) → self::E13 /* = core::int? */
|
||||
;
|
||||
static inline-class-member method E13|constructor#_#new#tearOff([core::int? foo]) → self::E13 /* = core::int? */
|
||||
return self::E13|constructor#(foo);
|
||||
static inline-class-member method E14|constructor#({core::String? foo = null}) → self::E14 /* = core::String? */
|
||||
;
|
||||
static inline-class-member method E14|constructor#_#new#tearOff({core::String? foo}) → self::E14 /* = core::String? */
|
||||
return self::E14|constructor#(foo: foo);
|
||||
static inline-class-member method E15|constructor#({required core::double foo = null}) → self::E15 /* = core::double */
|
||||
;
|
||||
static inline-class-member method E15|constructor#_#new#tearOff({required core::double foo}) → self::E15 /* = core::double */
|
||||
return self::E15|constructor#(foo: foo);
|
||||
static inline-class-member method E16|constructor#(core::bool foo, [dynamic bar = null]) → self::E16 /* = core::bool */
|
||||
;
|
||||
static inline-class-member method E16|constructor#_#new#tearOff(core::bool foo, [dynamic bar]) → self::E16 /* = core::bool */
|
||||
return self::E16|constructor#(foo, bar);
|
||||
static inline-class-member method E17|constructor#(core::Object foo, {core::num? bar = null, core::String? baz = null}) → self::E17 /* = core::Object */
|
||||
;
|
||||
static inline-class-member method E17|constructor#_#new#tearOff(core::Object foo, {core::num? bar, core::String? baz}) → self::E17 /* = core::Object */
|
||||
return self::E17|constructor#(foo, bar: bar, baz: baz);
|
||||
static inline-class-member method E18|constructor#(core::double foo, {required core::int bar = null}) → self::E18 /* = core::double */
|
||||
;
|
||||
static inline-class-member method E18|constructor#_#new#tearOff(core::double foo, {required core::int bar}) → self::E18 /* = core::double */
|
||||
return self::E18|constructor#(foo, bar: bar);
|
||||
|
||||
+97
-2
@@ -78,6 +78,30 @@ library;
|
||||
// extension type E12(bool foo = false,) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:17:26: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E13([int? foo]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:18:29: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E14({String? foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:19:37: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E15({required double foo}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:20:39: Error: Extension type declarations can't have optional parameters.
|
||||
// extension type E16(bool foo, [dynamic bar]) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:21:51: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E17(Object foo, {num? bar, String? baz}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/representation_field_error.dart:22:46: Error: Extension type declarations can't have named parameters.
|
||||
// extension type E18(double foo, {required int bar}) {} // Error.
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
@@ -143,6 +167,40 @@ extension type E12(core::bool foo) {
|
||||
constructor • = self::E12|constructor#;
|
||||
constructor tearoff • = self::E12|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E13(core::int? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::int?;
|
||||
constructor • = self::E13|constructor#;
|
||||
constructor tearoff • = self::E13|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E14(core::String? foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::String?;
|
||||
constructor • = self::E14|constructor#;
|
||||
constructor tearoff • = self::E14|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E15(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
constructor • = self::E15|constructor#;
|
||||
constructor tearoff • = self::E15|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E16(core::bool foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::bool;
|
||||
abstract inline-class-member representation-field get bar() → dynamic;
|
||||
constructor • = self::E16|constructor#;
|
||||
constructor tearoff • = self::E16|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E17(core::Object foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::Object;
|
||||
abstract inline-class-member representation-field get bar() → core::num?;
|
||||
abstract inline-class-member representation-field get baz() → core::String?;
|
||||
constructor • = self::E17|constructor#;
|
||||
constructor tearoff • = self::E17|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E18(core::double foo) {
|
||||
abstract inline-class-member representation-field get foo() → core::double;
|
||||
abstract inline-class-member representation-field get bar() → core::int;
|
||||
constructor • = self::E18|constructor#;
|
||||
constructor tearoff • = self::E18|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(dynamic foo) → self::E1 /* = dynamic */ {
|
||||
lowered final self::E1 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -173,12 +231,12 @@ static inline-class-member method E5|constructor#(core::bool foo) → self::E5 /
|
||||
}
|
||||
static inline-class-member method E5|constructor#_#new#tearOff(core::bool foo) → self::E5 /* = core::bool */
|
||||
return self::E5|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E6|constructor#(covariant-by-declaration final core::double foo) → self::E6 /* = core::double */ {
|
||||
lowered final self::E6 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E6|constructor#_#new#tearOff(core::double foo) → self::E6 /* = core::double */
|
||||
return self::E6|constructor#(foo);
|
||||
static inline-class-member method E7|constructor#(dynamic foo) → self::E7 /* = dynamic */ {
|
||||
lowered final self::E7 /* = dynamic */ #this = foo;
|
||||
return #this;
|
||||
@@ -215,7 +273,44 @@ static inline-class-member method E12|constructor#(core::bool foo = #C1) → sel
|
||||
}
|
||||
static inline-class-member method E12|constructor#_#new#tearOff(has-declared-initializer core::bool foo) → self::E12 /* = core::bool */
|
||||
return self::E12|constructor#(foo);
|
||||
static inline-class-member method E13|constructor#([core::int? foo = #C2]) → self::E13 /* = core::int? */ {
|
||||
lowered final self::E13 /* = core::int? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E13|constructor#_#new#tearOff([core::int? foo]) → self::E13 /* = core::int? */
|
||||
return self::E13|constructor#(foo);
|
||||
static inline-class-member method E14|constructor#({core::String? foo = #C2}) → self::E14 /* = core::String? */ {
|
||||
lowered final self::E14 /* = core::String? */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E14|constructor#_#new#tearOff({core::String? foo}) → self::E14 /* = core::String? */
|
||||
return self::E14|constructor#(foo: foo);
|
||||
static inline-class-member method E15|constructor#({required core::double foo = #C2}) → self::E15 /* = core::double */ {
|
||||
lowered final self::E15 /* = core::double */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E15|constructor#_#new#tearOff({required core::double foo}) → self::E15 /* = core::double */
|
||||
return self::E15|constructor#(foo: foo);
|
||||
static inline-class-member method E16|constructor#(core::bool foo, [dynamic bar = #C2]) → self::E16 /* = core::bool */ {
|
||||
lowered final self::E16 /* = core::bool */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E16|constructor#_#new#tearOff(core::bool foo, [dynamic bar]) → self::E16 /* = core::bool */
|
||||
return self::E16|constructor#(foo, bar);
|
||||
static inline-class-member method E17|constructor#(core::Object foo, {core::num? bar = #C2, core::String? baz = #C2}) → self::E17 /* = core::Object */ {
|
||||
lowered final self::E17 /* = core::Object */ #this = baz;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E17|constructor#_#new#tearOff(core::Object foo, {core::num? bar, core::String? baz}) → self::E17 /* = core::Object */
|
||||
return self::E17|constructor#(foo, bar: bar, baz: baz);
|
||||
static inline-class-member method E18|constructor#(core::double foo, {required core::int bar = #C2}) → self::E18 /* = core::double */ {
|
||||
lowered final self::E18 /* = core::double */ #this = bar;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E18|constructor#_#new#tearOff(core::double foo, {required core::int bar}) → self::E18 /* = core::double */
|
||||
return self::E18|constructor#(foo, bar: bar);
|
||||
|
||||
constants {
|
||||
#C1 = false
|
||||
#C2 = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user