[model] Enable checks in redirecting factories of extension types
This CL enables the same checks in the redirecting factories of extension types as in redirecting factories of classes. Additionally, this CL marks all of those erroneous constructors, in classes and in extension type declarations, as erroneous. Change-Id: Ic270324f05b6a8424c1ab9fbe9fe4f1d0b22a3fc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425860 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
This commit is contained in:
committed by
Commit Queue
parent
2f0cbeb485
commit
40d52d54af
@@ -1205,6 +1205,7 @@ class RepresentationFieldEncoding implements FieldEncoding {
|
||||
{required bool isSynthetic}) {
|
||||
return <Initializer>[
|
||||
new ExtensionTypeRepresentationFieldInitializer(_getter, value)
|
||||
..fileOffset = fileOffset
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ import '../codes/cfe_codes.dart' as cfe;
|
||||
import '../dill/dill_library_builder.dart' show DillLibraryBuilder;
|
||||
import '../dill/dill_type_parameter_builder.dart';
|
||||
import '../fragment/fragment.dart';
|
||||
import '../source/constructor_declaration.dart';
|
||||
import '../source/diet_parser.dart';
|
||||
import '../source/offset_map.dart';
|
||||
import '../source/source_library_builder.dart';
|
||||
@@ -9302,6 +9303,9 @@ class BodyBuilder extends StackListenerImpl
|
||||
cfe.messageUnexpectedSuperParametersInGenerativeConstructors,
|
||||
formal.fileOffset,
|
||||
noLength);
|
||||
if (constructorBuilder is ConstructorDeclarationBuilder) {
|
||||
constructorBuilder.markAsErroneous();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,7 +456,15 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
_initializers.add(initializer..parent = parent);
|
||||
}
|
||||
}
|
||||
} else if (initializer is RedirectingInitializer) {
|
||||
} else if (initializer
|
||||
case RedirectingInitializer(
|
||||
target: Member initializerTarget,
|
||||
arguments: var initializerArguments
|
||||
) ||
|
||||
ExtensionTypeRedirectingInitializer(
|
||||
target: Member initializerTarget,
|
||||
arguments: var initializerArguments
|
||||
)) {
|
||||
if (superInitializer != null) {
|
||||
// Point to the existing super initializer.
|
||||
_injectInvalidInitializer(
|
||||
@@ -465,6 +473,7 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
"super".length,
|
||||
helper,
|
||||
parent);
|
||||
markAsErroneous();
|
||||
} else if (redirectingInitializer != null) {
|
||||
_injectInvalidInitializer(
|
||||
messageRedirectingConstructorWithMultipleRedirectInitializers,
|
||||
@@ -472,6 +481,7 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
noLength,
|
||||
helper,
|
||||
parent);
|
||||
markAsErroneous();
|
||||
} else if (_initializers.isNotEmpty) {
|
||||
// Error on all previous ones.
|
||||
for (int i = 0; i < _initializers.length; i++) {
|
||||
@@ -488,22 +498,30 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
}
|
||||
inferenceResult?.applyResult(_initializers, parent);
|
||||
_initializers.add(initializer..parent = parent);
|
||||
redirectingInitializer = initializer;
|
||||
if (initializer is RedirectingInitializer) {
|
||||
redirectingInitializer = initializer;
|
||||
}
|
||||
markAsErroneous();
|
||||
} else {
|
||||
inferenceResult?.applyResult(_initializers, parent);
|
||||
redirectingInitializer = initializer;
|
||||
if (initializer is RedirectingInitializer) {
|
||||
redirectingInitializer = initializer;
|
||||
}
|
||||
|
||||
LocatedMessage? message = helper.checkArgumentsForFunction(
|
||||
initializer.target.function,
|
||||
initializer.arguments,
|
||||
initializer.arguments.fileOffset, const <TypeParameter>[]);
|
||||
initializerTarget.function!,
|
||||
initializerArguments,
|
||||
initializerArguments.fileOffset,
|
||||
initializer is ExtensionTypeRedirectingInitializer
|
||||
? initializerTarget.function!.typeParameters
|
||||
: const <TypeParameter>[]);
|
||||
if (message != null) {
|
||||
_initializers.add(helper.buildInvalidInitializer(
|
||||
helper.buildUnresolvedError(
|
||||
helper.constructorNameForDiagnostics(
|
||||
initializer.target.name.text),
|
||||
initializerTarget.name.text),
|
||||
initializer.fileOffset,
|
||||
arguments: initializer.arguments,
|
||||
arguments: initializerArguments,
|
||||
isSuper: false,
|
||||
message: message,
|
||||
kind: UnresolvedKind.Constructor))
|
||||
@@ -522,9 +540,11 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
length,
|
||||
helper,
|
||||
parent);
|
||||
markAsErroneous();
|
||||
} else if (superInitializer != null) {
|
||||
_injectInvalidInitializer(messageSuperInitializerNotLast,
|
||||
initializer.fileOffset, noLength, helper, parent);
|
||||
markAsErroneous();
|
||||
} else {
|
||||
inferenceResult?.applyResult(_initializers, parent);
|
||||
_initializers.add(initializer..parent = parent);
|
||||
|
||||
@@ -3,9 +3,15 @@
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
/*member: ExtensionType|constructor#:extensionName=ExtensionType.new*/
|
||||
extension type ExtensionType(int it) {
|
||||
extension type ExtensionType(int /*
|
||||
extensionThis,
|
||||
name=this
|
||||
*/it) {
|
||||
/*member: ExtensionType|constructor#constructor:extensionName=ExtensionType.constructor*/
|
||||
ExtensionType.constructor(this.it);
|
||||
ExtensionType.constructor(this./*
|
||||
extensionThis,
|
||||
name=this
|
||||
*/it);
|
||||
|
||||
/*member: ExtensionType|constructor#factory:extensionName=ExtensionType.factory*/
|
||||
factory ExtensionType.factory(int value) => ExtensionType(value);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2025, 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 E1(dynamic it) {
|
||||
E1.named(dynamic value) : this(value, value);
|
||||
}
|
||||
|
||||
extension type E2(num it) {
|
||||
E2.named(super.it) : this(it);
|
||||
}
|
||||
|
||||
extension type E3(String it) {
|
||||
E3.named(String it1, String it2) : this(it1), this(it2);
|
||||
}
|
||||
|
||||
extension type E4(bool it) {
|
||||
E4.named(bool it) : it = false, this(it);
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:10:18: Error: Extension type constructors can't declare super formal parameters.
|
||||
// E2.named(super.it) : this(it);
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:10:18: Error: Super parameters can only be used in non-redirecting generative constructors.
|
||||
// E2.named(super.it) : this(it);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:6:33: Error: Too many positional arguments: 1 allowed, but 2 found.
|
||||
// Try removing the extra positional arguments.
|
||||
// E1.named(dynamic value) : this(value, value);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:14:38: Error: A redirecting constructor can't have other initializers.
|
||||
// E3.named(String it1, String it2) : this(it1), this(it2);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:18:26: Error: A redirecting constructor can't have other initializers.
|
||||
// E4.named(bool it) : it = false, this(it);
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic it) {
|
||||
abstract extension-type-member representation-field get it() → dynamic;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
constructor named = self::E1|constructor#named;
|
||||
constructor tearoff named = self::E1|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E2(core::num it) {
|
||||
abstract extension-type-member representation-field get it() → core::num;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
constructor named = self::E2|constructor#named;
|
||||
constructor tearoff named = self::E2|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E3(core::String it) {
|
||||
abstract extension-type-member representation-field get it() → core::String;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(core::bool it) {
|
||||
abstract extension-type-member representation-field get it() → core::bool;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
constructor named = self::E4|constructor#named;
|
||||
constructor tearoff named = self::E4|constructor#_#named#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic it) → self::E1% /* erasure=dynamic, declared=! */ {
|
||||
lowered final self::E1% /* erasure=dynamic, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E1|constructor#_#new#tearOff(dynamic it) → self::E1% /* erasure=dynamic, declared=! */
|
||||
return self::E1|constructor#(it);
|
||||
static extension-type-member erroneous method E1|constructor#named(dynamic value) → self::E1% /* erasure=dynamic, declared=! */ {
|
||||
lowered final self::E1% /* erasure=dynamic, declared=! */ #this;
|
||||
final dynamic #t1 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:6:33: Error: Too many positional arguments: 1 allowed, but 2 found.
|
||||
Try removing the extra positional arguments.
|
||||
E1.named(dynamic value) : this(value, value);
|
||||
^";
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E1|constructor#_#named#tearOff(dynamic value) → self::E1% /* erasure=dynamic, declared=! */
|
||||
return self::E1|constructor#named(value);
|
||||
static extension-type-member erroneous method E2|constructor#(core::num it) → self::E2% /* erasure=core::num, declared=! */ {
|
||||
lowered final self::E2% /* erasure=core::num, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E2|constructor#_#new#tearOff(core::num it) → self::E2% /* erasure=core::num, declared=! */
|
||||
return self::E2|constructor#(it);
|
||||
static extension-type-member method E2|constructor#named(invalid-type it) → self::E2% /* erasure=core::num, declared=! */ {
|
||||
lowered final self::E2% /* erasure=core::num, declared=! */ #this;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E2|constructor#_#named#tearOff(invalid-type it) → self::E2% /* erasure=core::num, declared=! */
|
||||
return self::E2|constructor#named(it);
|
||||
static extension-type-member method E3|constructor#(core::String it) → self::E3% /* erasure=core::String, declared=! */ {
|
||||
lowered final self::E3% /* erasure=core::String, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E3|constructor#_#new#tearOff(core::String it) → self::E3% /* erasure=core::String, declared=! */
|
||||
return self::E3|constructor#(it);
|
||||
static extension-type-member erroneous method E3|constructor#named(core::String it1, core::String it2) → self::E3% /* erasure=core::String, declared=! */ {
|
||||
lowered final self::E3% /* erasure=core::String, declared=! */ #this;
|
||||
final dynamic #t2 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:14:38: Error: A redirecting constructor can't have other initializers.
|
||||
E3.named(String it1, String it2) : this(it1), this(it2);
|
||||
^";
|
||||
#this = self::E3|constructor#(it2);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E3|constructor#_#named#tearOff(core::String it1, core::String it2) → self::E3% /* erasure=core::String, declared=! */
|
||||
return self::E3|constructor#named(it1, it2);
|
||||
static extension-type-member method E4|constructor#(core::bool it) → self::E4% /* erasure=core::bool, declared=! */ {
|
||||
lowered final self::E4% /* erasure=core::bool, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E4|constructor#_#new#tearOff(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
return self::E4|constructor#(it);
|
||||
static extension-type-member erroneous method E4|constructor#named(core::bool it) → self::E4% /* erasure=core::bool, declared=! */ {
|
||||
lowered final self::E4% /* erasure=core::bool, declared=! */ #this;
|
||||
final dynamic #t3 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:18:26: Error: A redirecting constructor can't have other initializers.
|
||||
E4.named(bool it) : it = false, this(it);
|
||||
^";
|
||||
#this = self::E4|constructor#(it);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E4|constructor#_#named#tearOff(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
return self::E4|constructor#named(it);
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:10:18: Error: Extension type constructors can't declare super formal parameters.
|
||||
// E2.named(super.it) : this(it);
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:10:18: Error: Super parameters can only be used in non-redirecting generative constructors.
|
||||
// E2.named(super.it) : this(it);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:6:33: Error: Too many positional arguments: 1 allowed, but 2 found.
|
||||
// Try removing the extra positional arguments.
|
||||
// E1.named(dynamic value) : this(value, value);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:14:38: Error: A redirecting constructor can't have other initializers.
|
||||
// E3.named(String it1, String it2) : this(it1), this(it2);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:18:26: Error: A redirecting constructor can't have other initializers.
|
||||
// E4.named(bool it) : it = false, this(it);
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic it) {
|
||||
abstract extension-type-member representation-field get it() → dynamic;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
constructor named = self::E1|constructor#named;
|
||||
constructor tearoff named = self::E1|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E2(core::num it) {
|
||||
abstract extension-type-member representation-field get it() → core::num;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
constructor named = self::E2|constructor#named;
|
||||
constructor tearoff named = self::E2|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E3(core::String it) {
|
||||
abstract extension-type-member representation-field get it() → core::String;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(core::bool it) {
|
||||
abstract extension-type-member representation-field get it() → core::bool;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
constructor named = self::E4|constructor#named;
|
||||
constructor tearoff named = self::E4|constructor#_#named#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic it) → self::E1% /* erasure=dynamic, declared=! */ {
|
||||
lowered final self::E1% /* erasure=dynamic, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E1|constructor#_#new#tearOff(dynamic it) → self::E1% /* erasure=dynamic, declared=! */
|
||||
return self::E1|constructor#(it);
|
||||
static extension-type-member erroneous method E1|constructor#named(dynamic value) → self::E1% /* erasure=dynamic, declared=! */ {
|
||||
lowered final self::E1% /* erasure=dynamic, declared=! */ #this;
|
||||
final dynamic #t1 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:6:33: Error: Too many positional arguments: 1 allowed, but 2 found.
|
||||
Try removing the extra positional arguments.
|
||||
E1.named(dynamic value) : this(value, value);
|
||||
^";
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E1|constructor#_#named#tearOff(dynamic value) → self::E1% /* erasure=dynamic, declared=! */
|
||||
return self::E1|constructor#named(value);
|
||||
static extension-type-member erroneous method E2|constructor#(core::num it) → self::E2% /* erasure=core::num, declared=! */ {
|
||||
lowered final self::E2% /* erasure=core::num, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E2|constructor#_#new#tearOff(core::num it) → self::E2% /* erasure=core::num, declared=! */
|
||||
return self::E2|constructor#(it);
|
||||
static extension-type-member method E2|constructor#named(invalid-type it) → self::E2% /* erasure=core::num, declared=! */ {
|
||||
lowered final self::E2% /* erasure=core::num, declared=! */ #this;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E2|constructor#_#named#tearOff(invalid-type it) → self::E2% /* erasure=core::num, declared=! */
|
||||
return self::E2|constructor#named(it);
|
||||
static extension-type-member method E3|constructor#(core::String it) → self::E3% /* erasure=core::String, declared=! */ {
|
||||
lowered final self::E3% /* erasure=core::String, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E3|constructor#_#new#tearOff(core::String it) → self::E3% /* erasure=core::String, declared=! */
|
||||
return self::E3|constructor#(it);
|
||||
static extension-type-member erroneous method E3|constructor#named(core::String it1, core::String it2) → self::E3% /* erasure=core::String, declared=! */ {
|
||||
lowered final self::E3% /* erasure=core::String, declared=! */ #this;
|
||||
final dynamic #t2 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:14:38: Error: A redirecting constructor can't have other initializers.
|
||||
E3.named(String it1, String it2) : this(it1), this(it2);
|
||||
^";
|
||||
#this = self::E3|constructor#(it2);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E3|constructor#_#named#tearOff(core::String it1, core::String it2) → self::E3% /* erasure=core::String, declared=! */
|
||||
return self::E3|constructor#named(it1, it2);
|
||||
static extension-type-member method E4|constructor#(core::bool it) → self::E4% /* erasure=core::bool, declared=! */ {
|
||||
lowered final self::E4% /* erasure=core::bool, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E4|constructor#_#new#tearOff(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
return self::E4|constructor#(it);
|
||||
static extension-type-member erroneous method E4|constructor#named(core::bool it) → self::E4% /* erasure=core::bool, declared=! */ {
|
||||
lowered final self::E4% /* erasure=core::bool, declared=! */ #this;
|
||||
final dynamic #t3 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:18:26: Error: A redirecting constructor can't have other initializers.
|
||||
E4.named(bool it) : it = false, this(it);
|
||||
^";
|
||||
#this = self::E4|constructor#(it);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E4|constructor#_#named#tearOff(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
return self::E4|constructor#named(it);
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:10:18: Error: Extension type constructors can't declare super formal parameters.
|
||||
// E2.named(super.it) : this(it);
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:10:18: Error: Super parameters can only be used in non-redirecting generative constructors.
|
||||
// E2.named(super.it) : this(it);
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic it) {
|
||||
abstract extension-type-member representation-field get it() → dynamic;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
constructor named = self::E1|constructor#named;
|
||||
constructor tearoff named = self::E1|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E2(core::num it) {
|
||||
abstract extension-type-member representation-field get it() → core::num;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
constructor named = self::E2|constructor#named;
|
||||
constructor tearoff named = self::E2|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E3(core::String it) {
|
||||
abstract extension-type-member representation-field get it() → core::String;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(core::bool it) {
|
||||
abstract extension-type-member representation-field get it() → core::bool;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
constructor named = self::E4|constructor#named;
|
||||
constructor tearoff named = self::E4|constructor#_#named#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic it) → self::E1% /* erasure=dynamic, declared=! */
|
||||
;
|
||||
static extension-type-member synthetic method E1|constructor#_#new#tearOff(dynamic it) → self::E1% /* erasure=dynamic, declared=! */
|
||||
return self::E1|constructor#(it);
|
||||
static extension-type-member method E1|constructor#named(dynamic value) → self::E1% /* erasure=dynamic, declared=! */
|
||||
;
|
||||
static extension-type-member synthetic method E1|constructor#_#named#tearOff(dynamic value) → self::E1% /* erasure=dynamic, declared=! */
|
||||
return self::E1|constructor#named(value);
|
||||
static extension-type-member erroneous method E2|constructor#(core::num it) → self::E2% /* erasure=core::num, declared=! */
|
||||
;
|
||||
static extension-type-member synthetic method E2|constructor#_#new#tearOff(core::num it) → self::E2% /* erasure=core::num, declared=! */
|
||||
return self::E2|constructor#(it);
|
||||
static extension-type-member method E2|constructor#named(invalid-type it) → self::E2% /* erasure=core::num, declared=! */ {
|
||||
lowered final self::E2% /* erasure=core::num, declared=! */ #this;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E2|constructor#_#named#tearOff(invalid-type it) → self::E2% /* erasure=core::num, declared=! */
|
||||
return self::E2|constructor#named(it);
|
||||
static extension-type-member method E3|constructor#(core::String it) → self::E3% /* erasure=core::String, declared=! */
|
||||
;
|
||||
static extension-type-member synthetic method E3|constructor#_#new#tearOff(core::String it) → self::E3% /* erasure=core::String, declared=! */
|
||||
return self::E3|constructor#(it);
|
||||
static extension-type-member method E3|constructor#named(core::String it1, core::String it2) → self::E3% /* erasure=core::String, declared=! */
|
||||
;
|
||||
static extension-type-member synthetic method E3|constructor#_#named#tearOff(core::String it1, core::String it2) → self::E3% /* erasure=core::String, declared=! */
|
||||
return self::E3|constructor#named(it1, it2);
|
||||
static extension-type-member method E4|constructor#(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
;
|
||||
static extension-type-member synthetic method E4|constructor#_#new#tearOff(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
return self::E4|constructor#(it);
|
||||
static extension-type-member method E4|constructor#named(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
;
|
||||
static extension-type-member synthetic method E4|constructor#_#named#tearOff(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
return self::E4|constructor#named(it);
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:10:18: Error: Extension type constructors can't declare super formal parameters.
|
||||
// E2.named(super.it) : this(it);
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:10:18: Error: Super parameters can only be used in non-redirecting generative constructors.
|
||||
// E2.named(super.it) : this(it);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:6:33: Error: Too many positional arguments: 1 allowed, but 2 found.
|
||||
// Try removing the extra positional arguments.
|
||||
// E1.named(dynamic value) : this(value, value);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:14:38: Error: A redirecting constructor can't have other initializers.
|
||||
// E3.named(String it1, String it2) : this(it1), this(it2);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/erroneous_constructors.dart:18:26: Error: A redirecting constructor can't have other initializers.
|
||||
// E4.named(bool it) : it = false, this(it);
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
extension type E1(dynamic it) {
|
||||
abstract extension-type-member representation-field get it() → dynamic;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
constructor named = self::E1|constructor#named;
|
||||
constructor tearoff named = self::E1|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E2(core::num it) {
|
||||
abstract extension-type-member representation-field get it() → core::num;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
constructor named = self::E2|constructor#named;
|
||||
constructor tearoff named = self::E2|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E3(core::String it) {
|
||||
abstract extension-type-member representation-field get it() → core::String;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
constructor named = self::E3|constructor#named;
|
||||
constructor tearoff named = self::E3|constructor#_#named#tearOff;
|
||||
}
|
||||
extension type E4(core::bool it) {
|
||||
abstract extension-type-member representation-field get it() → core::bool;
|
||||
constructor • = self::E4|constructor#;
|
||||
constructor tearoff • = self::E4|constructor#_#new#tearOff;
|
||||
constructor named = self::E4|constructor#named;
|
||||
constructor tearoff named = self::E4|constructor#_#named#tearOff;
|
||||
}
|
||||
static extension-type-member method E1|constructor#(dynamic it) → self::E1% /* erasure=dynamic, declared=! */ {
|
||||
lowered final self::E1% /* erasure=dynamic, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E1|constructor#_#new#tearOff(dynamic it) → self::E1% /* erasure=dynamic, declared=! */
|
||||
return self::E1|constructor#(it);
|
||||
static extension-type-member erroneous method E1|constructor#named(dynamic value) → self::E1% /* erasure=dynamic, declared=! */ {
|
||||
lowered final self::E1% /* erasure=dynamic, declared=! */ #this;
|
||||
final dynamic #t1 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:6:33: Error: Too many positional arguments: 1 allowed, but 2 found.
|
||||
Try removing the extra positional arguments.
|
||||
E1.named(dynamic value) : this(value, value);
|
||||
^";
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E1|constructor#_#named#tearOff(dynamic value) → self::E1% /* erasure=dynamic, declared=! */
|
||||
return self::E1|constructor#named(value);
|
||||
static extension-type-member erroneous method E2|constructor#(core::num it) → self::E2% /* erasure=core::num, declared=! */ {
|
||||
lowered final self::E2% /* erasure=core::num, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E2|constructor#_#new#tearOff(core::num it) → self::E2% /* erasure=core::num, declared=! */
|
||||
return self::E2|constructor#(it);
|
||||
static extension-type-member method E2|constructor#named(invalid-type it) → self::E2% /* erasure=core::num, declared=! */ {
|
||||
lowered final self::E2% /* erasure=core::num, declared=! */ #this;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E2|constructor#_#named#tearOff(invalid-type it) → self::E2% /* erasure=core::num, declared=! */
|
||||
return self::E2|constructor#named(it);
|
||||
static extension-type-member method E3|constructor#(core::String it) → self::E3% /* erasure=core::String, declared=! */ {
|
||||
lowered final self::E3% /* erasure=core::String, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E3|constructor#_#new#tearOff(core::String it) → self::E3% /* erasure=core::String, declared=! */
|
||||
return self::E3|constructor#(it);
|
||||
static extension-type-member erroneous method E3|constructor#named(core::String it1, core::String it2) → self::E3% /* erasure=core::String, declared=! */ {
|
||||
lowered final self::E3% /* erasure=core::String, declared=! */ #this;
|
||||
final dynamic #t2 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:14:38: Error: A redirecting constructor can't have other initializers.
|
||||
E3.named(String it1, String it2) : this(it1), this(it2);
|
||||
^";
|
||||
#this = self::E3|constructor#(it2);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E3|constructor#_#named#tearOff(core::String it1, core::String it2) → self::E3% /* erasure=core::String, declared=! */
|
||||
return self::E3|constructor#named(it1, it2);
|
||||
static extension-type-member method E4|constructor#(core::bool it) → self::E4% /* erasure=core::bool, declared=! */ {
|
||||
lowered final self::E4% /* erasure=core::bool, declared=! */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E4|constructor#_#new#tearOff(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
return self::E4|constructor#(it);
|
||||
static extension-type-member erroneous method E4|constructor#named(core::bool it) → self::E4% /* erasure=core::bool, declared=! */ {
|
||||
lowered final self::E4% /* erasure=core::bool, declared=! */ #this;
|
||||
final dynamic #t3 = invalid-expression "pkg/front_end/testcases/extension_types/erroneous_constructors.dart:18:26: Error: A redirecting constructor can't have other initializers.
|
||||
E4.named(bool it) : it = false, this(it);
|
||||
^";
|
||||
#this = self::E4|constructor#(it);
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member synthetic method E4|constructor#_#named#tearOff(core::bool it) → self::E4% /* erasure=core::bool, declared=! */
|
||||
return self::E4|constructor#named(it);
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
extension type E1(dynamic it) {
|
||||
E1.named(dynamic value) : this(value, value);
|
||||
}
|
||||
|
||||
extension type E2(num it) {
|
||||
E2.named(super.it) : this(it);
|
||||
}
|
||||
|
||||
extension type E3(String it) {
|
||||
E3.named(String it1, String it2)
|
||||
: this(it1),
|
||||
this(it2);
|
||||
}
|
||||
|
||||
extension type E4(bool it) {
|
||||
E4.named(bool it)
|
||||
: it = false,
|
||||
this(it);
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
extension type E1(dynamic it) {
|
||||
E1.named(dynamic value) : this(value, value);
|
||||
}
|
||||
|
||||
extension type E2(num it) {
|
||||
E2.named(super.it) : this(it);
|
||||
}
|
||||
|
||||
extension type E3(String it) {
|
||||
E3.named(String it1, String it2)
|
||||
: this(it1),
|
||||
this(it2);
|
||||
}
|
||||
|
||||
extension type E4(bool it) {
|
||||
E4.named(bool it)
|
||||
: it = false,
|
||||
this(it);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ class C extends core::Object {
|
||||
class D extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::D
|
||||
erroneous constructor •() → self::D
|
||||
: final dynamic #t5 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:30:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 41,
|
||||
^", final dynamic #t6 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:32:16: Error: A redirecting constructor can't have other initializers.
|
||||
@@ -136,7 +136,7 @@ class D extends core::Object {
|
||||
class E extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::E
|
||||
erroneous constructor •() → self::E
|
||||
: final dynamic #t7 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:43:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.x = 1,
|
||||
^", final dynamic #t8 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:44:16: Error: A redirecting constructor can't have other initializers.
|
||||
@@ -144,14 +144,14 @@ class E extends core::Object {
|
||||
^", this self::E::named() {}
|
||||
constructor named() → self::E
|
||||
: self::E::x = 41, self::E::y = 42, super core::Object::•() {}
|
||||
constructor named2() → self::E
|
||||
erroneous constructor named2() → self::E
|
||||
: final dynamic #t9 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:49:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 1,
|
||||
^", final dynamic #t10 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:51:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.y = 2;
|
||||
^", this self::E::named()
|
||||
;
|
||||
constructor named3() → self::E
|
||||
erroneous constructor named3() → self::E
|
||||
: final dynamic #t11 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:53:9: Error: A redirecting constructor can't have a 'super' initializer.
|
||||
: super(),
|
||||
^^^^^", final dynamic #t12 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:55:16: Error: Can't have initializers after 'super'.
|
||||
@@ -160,19 +160,19 @@ class E extends core::Object {
|
||||
this.y = 2;
|
||||
^", super core::Object::•()
|
||||
;
|
||||
constructor named4() → self::E
|
||||
erroneous constructor named4() → self::E
|
||||
: final dynamic #t14 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:58:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 1,
|
||||
^", final dynamic #t15 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:59:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.y = 2,
|
||||
^", this self::E::named()
|
||||
;
|
||||
constructor named5() → self::E
|
||||
erroneous constructor named5() → self::E
|
||||
: final dynamic #t16 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:62:9: Error: A redirecting constructor can't have other initializers.
|
||||
: assert(true),
|
||||
^^^^^^", this self::E::named()
|
||||
;
|
||||
constructor named6() → self::E
|
||||
erroneous constructor named6() → self::E
|
||||
: final dynamic #t17 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:66:9: Error: A redirecting constructor can't have other initializers.
|
||||
assert(true);
|
||||
^^^^^^", this self::E::named()
|
||||
@@ -187,7 +187,7 @@ class F extends core::Object {
|
||||
: super core::Object::•() {}
|
||||
}
|
||||
class G extends core::Object {
|
||||
constructor •() → self::G
|
||||
erroneous constructor •() → self::G
|
||||
: final dynamic #t19 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:78:9: Error: A redirecting constructor can't have a 'super' initializer.
|
||||
: super(),
|
||||
^^^^^", final dynamic #t20 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:80:9: Error: Can't have more than one 'super' initializer.
|
||||
@@ -197,7 +197,7 @@ class G extends core::Object {
|
||||
: super core::Object::•() {}
|
||||
}
|
||||
class H extends core::Object {
|
||||
constructor •() → self::H
|
||||
erroneous constructor •() → self::H
|
||||
: final dynamic #t21 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:87:14: Error: A redirecting constructor can't have more than one redirection.
|
||||
this.named();
|
||||
^", this self::H::named()
|
||||
@@ -213,7 +213,7 @@ class I extends core::Object {
|
||||
}
|
||||
class J extends core::Object {
|
||||
field core::int x;
|
||||
constructor •() → self::J
|
||||
erroneous constructor •() → self::J
|
||||
: final dynamic #t23 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:101:16: Error: Can't have initializers after 'super'.
|
||||
this.x = 42 {}
|
||||
^", super core::Object::•() {}
|
||||
|
||||
@@ -124,7 +124,7 @@ class C extends core::Object {
|
||||
class D extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::D
|
||||
erroneous constructor •() → self::D
|
||||
: final dynamic #t5 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:30:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 41,
|
||||
^", final dynamic #t6 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:32:16: Error: A redirecting constructor can't have other initializers.
|
||||
@@ -136,7 +136,7 @@ class D extends core::Object {
|
||||
class E extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::E
|
||||
erroneous constructor •() → self::E
|
||||
: final dynamic #t7 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:43:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.x = 1,
|
||||
^", final dynamic #t8 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:44:16: Error: A redirecting constructor can't have other initializers.
|
||||
@@ -144,14 +144,14 @@ class E extends core::Object {
|
||||
^", this self::E::named() {}
|
||||
constructor named() → self::E
|
||||
: self::E::x = 41, self::E::y = 42, super core::Object::•() {}
|
||||
constructor named2() → self::E
|
||||
erroneous constructor named2() → self::E
|
||||
: final dynamic #t9 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:49:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 1,
|
||||
^", final dynamic #t10 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:51:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.y = 2;
|
||||
^", this self::E::named()
|
||||
;
|
||||
constructor named3() → self::E
|
||||
erroneous constructor named3() → self::E
|
||||
: final dynamic #t11 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:53:9: Error: A redirecting constructor can't have a 'super' initializer.
|
||||
: super(),
|
||||
^^^^^", final dynamic #t12 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:55:16: Error: Can't have initializers after 'super'.
|
||||
@@ -160,19 +160,19 @@ class E extends core::Object {
|
||||
this.y = 2;
|
||||
^", super core::Object::•()
|
||||
;
|
||||
constructor named4() → self::E
|
||||
erroneous constructor named4() → self::E
|
||||
: final dynamic #t14 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:58:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 1,
|
||||
^", final dynamic #t15 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:59:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.y = 2,
|
||||
^", this self::E::named()
|
||||
;
|
||||
constructor named5() → self::E
|
||||
erroneous constructor named5() → self::E
|
||||
: final dynamic #t16 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:62:9: Error: A redirecting constructor can't have other initializers.
|
||||
: assert(true),
|
||||
^^^^^^", this self::E::named()
|
||||
;
|
||||
constructor named6() → self::E
|
||||
erroneous constructor named6() → self::E
|
||||
: final dynamic #t17 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:66:9: Error: A redirecting constructor can't have other initializers.
|
||||
assert(true);
|
||||
^^^^^^", this self::E::named()
|
||||
@@ -187,7 +187,7 @@ class F extends core::Object {
|
||||
: super core::Object::•() {}
|
||||
}
|
||||
class G extends core::Object {
|
||||
constructor •() → self::G
|
||||
erroneous constructor •() → self::G
|
||||
: final dynamic #t19 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:78:9: Error: A redirecting constructor can't have a 'super' initializer.
|
||||
: super(),
|
||||
^^^^^", final dynamic #t20 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:80:9: Error: Can't have more than one 'super' initializer.
|
||||
@@ -197,7 +197,7 @@ class G extends core::Object {
|
||||
: super core::Object::•() {}
|
||||
}
|
||||
class H extends core::Object {
|
||||
constructor •() → self::H
|
||||
erroneous constructor •() → self::H
|
||||
: final dynamic #t21 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:87:14: Error: A redirecting constructor can't have more than one redirection.
|
||||
this.named();
|
||||
^", this self::H::named()
|
||||
@@ -213,7 +213,7 @@ class I extends core::Object {
|
||||
}
|
||||
class J extends core::Object {
|
||||
field core::int x;
|
||||
constructor •() → self::J
|
||||
erroneous constructor •() → self::J
|
||||
: final dynamic #t23 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:101:16: Error: Can't have initializers after 'super'.
|
||||
this.x = 42 {}
|
||||
^", super core::Object::•() {}
|
||||
|
||||
+10
-10
@@ -124,7 +124,7 @@ class C extends core::Object {
|
||||
class D extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::D
|
||||
erroneous constructor •() → self::D
|
||||
: final dynamic #t5 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:30:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 41,
|
||||
^", final dynamic #t6 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:32:16: Error: A redirecting constructor can't have other initializers.
|
||||
@@ -136,7 +136,7 @@ class D extends core::Object {
|
||||
class E extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::E
|
||||
erroneous constructor •() → self::E
|
||||
: final dynamic #t7 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:43:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.x = 1,
|
||||
^", final dynamic #t8 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:44:16: Error: A redirecting constructor can't have other initializers.
|
||||
@@ -144,14 +144,14 @@ class E extends core::Object {
|
||||
^", this self::E::named() {}
|
||||
constructor named() → self::E
|
||||
: self::E::x = 41, self::E::y = 42, super core::Object::•() {}
|
||||
constructor named2() → self::E
|
||||
erroneous constructor named2() → self::E
|
||||
: final dynamic #t9 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:49:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 1,
|
||||
^", final dynamic #t10 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:51:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.y = 2;
|
||||
^", this self::E::named()
|
||||
;
|
||||
constructor named3() → self::E
|
||||
erroneous constructor named3() → self::E
|
||||
: final dynamic #t11 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:53:9: Error: A redirecting constructor can't have a 'super' initializer.
|
||||
: super(),
|
||||
^^^^^", final dynamic #t12 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:55:16: Error: Can't have initializers after 'super'.
|
||||
@@ -160,19 +160,19 @@ class E extends core::Object {
|
||||
this.y = 2;
|
||||
^", super core::Object::•()
|
||||
;
|
||||
constructor named4() → self::E
|
||||
erroneous constructor named4() → self::E
|
||||
: final dynamic #t14 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:58:16: Error: A redirecting constructor can't have other initializers.
|
||||
: this.x = 1,
|
||||
^", final dynamic #t15 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:59:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.y = 2,
|
||||
^", this self::E::named()
|
||||
;
|
||||
constructor named5() → self::E
|
||||
erroneous constructor named5() → self::E
|
||||
: final dynamic #t16 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:62:9: Error: A redirecting constructor can't have other initializers.
|
||||
: assert(true),
|
||||
^^^^^^", this self::E::named()
|
||||
;
|
||||
constructor named6() → self::E
|
||||
erroneous constructor named6() → self::E
|
||||
: final dynamic #t17 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:66:9: Error: A redirecting constructor can't have other initializers.
|
||||
assert(true);
|
||||
^^^^^^", this self::E::named()
|
||||
@@ -187,7 +187,7 @@ class F extends core::Object {
|
||||
: super core::Object::•() {}
|
||||
}
|
||||
class G extends core::Object {
|
||||
constructor •() → self::G
|
||||
erroneous constructor •() → self::G
|
||||
: final dynamic #t19 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:78:9: Error: A redirecting constructor can't have a 'super' initializer.
|
||||
: super(),
|
||||
^^^^^", final dynamic #t20 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:80:9: Error: Can't have more than one 'super' initializer.
|
||||
@@ -197,7 +197,7 @@ class G extends core::Object {
|
||||
: super core::Object::•() {}
|
||||
}
|
||||
class H extends core::Object {
|
||||
constructor •() → self::H
|
||||
erroneous constructor •() → self::H
|
||||
: final dynamic #t21 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:87:14: Error: A redirecting constructor can't have more than one redirection.
|
||||
this.named();
|
||||
^", this self::H::named()
|
||||
@@ -213,7 +213,7 @@ class I extends core::Object {
|
||||
}
|
||||
class J extends core::Object {
|
||||
field core::int x;
|
||||
constructor •() → self::J
|
||||
erroneous constructor •() → self::J
|
||||
: final dynamic #t23 = invalid-expression "pkg/front_end/testcases/general/initialization_errors.dart:101:16: Error: Can't have initializers after 'super'.
|
||||
this.x = 42 {}
|
||||
^", super core::Object::•() {}
|
||||
|
||||
@@ -32,7 +32,7 @@ import "dart:core" as core;
|
||||
class E extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::E
|
||||
erroneous constructor •() → self::E
|
||||
: final dynamic #t1 = invalid-expression "pkg/front_end/testcases/general/issue43363.dart:9:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.x = 1;
|
||||
^", this self::E::named()
|
||||
|
||||
@@ -32,7 +32,7 @@ import "dart:core" as core;
|
||||
class E extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::E
|
||||
erroneous constructor •() → self::E
|
||||
: final dynamic #t1 = invalid-expression "pkg/front_end/testcases/general/issue43363.dart:9:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.x = 1;
|
||||
^", this self::E::named()
|
||||
|
||||
@@ -32,7 +32,7 @@ import "dart:core" as core;
|
||||
class E extends core::Object {
|
||||
final field core::int x;
|
||||
final field core::int y;
|
||||
constructor •() → self::E
|
||||
erroneous constructor •() → self::E
|
||||
: final dynamic #t1 = invalid-expression "pkg/front_end/testcases/general/issue43363.dart:9:16: Error: A redirecting constructor can't have other initializers.
|
||||
this.x = 1;
|
||||
^", this self::E::named()
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class A extends core::Object {
|
||||
;
|
||||
}
|
||||
class C extends self::A {
|
||||
constructor •(wildcard core::int _#wc0#formal) → self::C
|
||||
erroneous constructor •(wildcard core::int _#wc0#formal) → self::C
|
||||
: super self::A::•(_#wc0#formal)
|
||||
;
|
||||
constructor r(wildcard core::int _#wc1#formal) → self::C
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class A extends core::Object {
|
||||
;
|
||||
}
|
||||
class C extends self::A {
|
||||
constructor •(wildcard core::int _#wc0#formal) → self::C
|
||||
erroneous constructor •(wildcard core::int _#wc0#formal) → self::C
|
||||
: super self::A::•(_#wc0#formal)
|
||||
;
|
||||
constructor r(wildcard core::int _#wc1#formal) → self::C
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ class A extends core::Object {
|
||||
;
|
||||
}
|
||||
class C extends self::A {
|
||||
constructor •(wildcard core::int _#wc0#formal) → self::C
|
||||
erroneous constructor •(wildcard core::int _#wc0#formal) → self::C
|
||||
;
|
||||
constructor r(wildcard core::int _#wc1#formal) → self::C
|
||||
;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class A extends core::Object {
|
||||
;
|
||||
}
|
||||
class C extends self::A {
|
||||
constructor •(wildcard core::int _#wc0#formal) → self::C
|
||||
erroneous constructor •(wildcard core::int _#wc0#formal) → self::C
|
||||
: super self::A::•(_#wc0#formal)
|
||||
;
|
||||
constructor r(wildcard core::int _#wc1#formal) → self::C
|
||||
|
||||
@@ -30,17 +30,17 @@ class Super extends core::Object {
|
||||
}
|
||||
class Sub extends self::Super {
|
||||
field dynamic field;
|
||||
constructor arg0() → self::Sub
|
||||
erroneous constructor arg0() → self::Sub
|
||||
: final dynamic #t1 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:15:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg0()
|
||||
;
|
||||
constructor arg1(dynamic a) → self::Sub
|
||||
erroneous constructor arg1(dynamic a) → self::Sub
|
||||
: final dynamic #t2 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:18:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg1(a)
|
||||
;
|
||||
constructor arg2(dynamic a, dynamic b) → self::Sub
|
||||
erroneous constructor arg2(dynamic a, dynamic b) → self::Sub
|
||||
: final dynamic #t3 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:21:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg2(a, b)
|
||||
|
||||
@@ -30,17 +30,17 @@ class Super extends core::Object {
|
||||
}
|
||||
class Sub extends self::Super {
|
||||
field dynamic field;
|
||||
constructor arg0() → self::Sub
|
||||
erroneous constructor arg0() → self::Sub
|
||||
: final dynamic #t1 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:15:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg0()
|
||||
;
|
||||
constructor arg1(dynamic a) → self::Sub
|
||||
erroneous constructor arg1(dynamic a) → self::Sub
|
||||
: final dynamic #t2 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:18:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg1(a)
|
||||
;
|
||||
constructor arg2(dynamic a, dynamic b) → self::Sub
|
||||
erroneous constructor arg2(dynamic a, dynamic b) → self::Sub
|
||||
: final dynamic #t3 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:21:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg2(a, b)
|
||||
|
||||
@@ -30,17 +30,17 @@ class Super extends core::Object {
|
||||
}
|
||||
class Sub extends self::Super {
|
||||
field dynamic field;
|
||||
constructor arg0() → self::Sub
|
||||
erroneous constructor arg0() → self::Sub
|
||||
: final dynamic #t1 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:15:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg0()
|
||||
;
|
||||
constructor arg1(dynamic a) → self::Sub
|
||||
erroneous constructor arg1(dynamic a) → self::Sub
|
||||
: final dynamic #t2 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:18:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg1(a)
|
||||
;
|
||||
constructor arg2(dynamic a, dynamic b) → self::Sub
|
||||
erroneous constructor arg2(dynamic a, dynamic b) → self::Sub
|
||||
: final dynamic #t3 = invalid-expression "pkg/front_end/testcases/rasta/super_initializer.dart:21:15: Error: Can't have initializers after 'super'.
|
||||
field = 42;
|
||||
^", super self::Super::arg2(a, b)
|
||||
|
||||
@@ -1405,8 +1405,8 @@ class Arguments extends TreeNode {
|
||||
.map((p) => new NamedExpression(p.name!, new VariableGet(p)))
|
||||
.toList(),
|
||||
types: function.typeParameters
|
||||
.map<DartType>((p) =>
|
||||
new TypeParameterType.withDefaultNullability(p))
|
||||
.map<DartType>(
|
||||
(p) => new TypeParameterType.withDefaultNullability(p))
|
||||
.toList());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user