[private named parameters] Report collision between public name and other parameters in CFE.
Change-Id: I4a3260b3bc280b6a7fb202c16e2b1ee862bfc018 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465461 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com>
This commit is contained in:
committed by
Commit Queue
parent
bc3a70cdc8
commit
5baa00aec9
@@ -13937,6 +13937,35 @@ const MessageCode codePositionalSuperParametersAndArguments = const MessageCode(
|
||||
"""Positional super-initializer parameters cannot be used when the super initializer has positional arguments.""",
|
||||
);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<
|
||||
Message Function(String name),
|
||||
Message Function({required String name})
|
||||
>
|
||||
codePrivateNamedParameterDuplicatePublicName = const Template(
|
||||
"PrivateNamedParameterDuplicatePublicName",
|
||||
withArgumentsOld: _withArgumentsOldPrivateNamedParameterDuplicatePublicName,
|
||||
withArguments: _withArgumentsPrivateNamedParameterDuplicatePublicName,
|
||||
);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsPrivateNamedParameterDuplicatePublicName({
|
||||
required String name,
|
||||
}) {
|
||||
var name_0 = conversions.validateString(name);
|
||||
return new Message(
|
||||
codePrivateNamedParameterDuplicatePublicName,
|
||||
problemMessage:
|
||||
"""The corresponding public name '${name_0}' is already the name of another parameter.""",
|
||||
arguments: {'name': name},
|
||||
);
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsOldPrivateNamedParameterDuplicatePublicName(
|
||||
String name,
|
||||
) => _withArgumentsPrivateNamedParameterDuplicatePublicName(name: name);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const MessageCode
|
||||
codePrivateNamedParameterWithoutPublicName = const MessageCode(
|
||||
|
||||
@@ -3140,6 +3140,26 @@ class OutlineBuilder extends StackListenerImpl {
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// For private named parameters, also look for a collision between the
|
||||
// corresponding public name and another parameter's name.
|
||||
if (formals[0].publicName case var publicName?
|
||||
when publicName == formals[1].name) {
|
||||
_privateNamedParameterPublicNameCollision(
|
||||
publicName,
|
||||
formals[0],
|
||||
formals[1],
|
||||
);
|
||||
}
|
||||
|
||||
if (formals[1].publicName case var publicName?
|
||||
when publicName == formals[0].name) {
|
||||
_privateNamedParameterPublicNameCollision(
|
||||
publicName,
|
||||
formals[1],
|
||||
formals[0],
|
||||
);
|
||||
}
|
||||
} else if (formals.length > 2) {
|
||||
Map<String, FormalParameterBuilder> seenNames =
|
||||
<String, FormalParameterBuilder>{};
|
||||
@@ -3168,6 +3188,20 @@ class OutlineBuilder extends StackListenerImpl {
|
||||
seenNames[formal.name] = formal;
|
||||
}
|
||||
}
|
||||
|
||||
// For private named parameters, also look for a collision between the
|
||||
// corresponding public name and another parameter's name.
|
||||
for (FormalParameterBuilder formal in formals) {
|
||||
if (formal.publicName case var publicName?) {
|
||||
if (seenNames[publicName] case var previous?) {
|
||||
_privateNamedParameterPublicNameCollision(
|
||||
publicName,
|
||||
formal,
|
||||
previous,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (declarationContext == DeclarationContext.ExtensionType &&
|
||||
@@ -3199,6 +3233,25 @@ class OutlineBuilder extends StackListenerImpl {
|
||||
push(formals ?? NullValues.FormalParameters);
|
||||
}
|
||||
|
||||
/// Report a duplicate declaration error between a private named [formal]
|
||||
/// with [publicName] and another [previous] parameter.
|
||||
void _privateNamedParameterPublicNameCollision(
|
||||
String publicName,
|
||||
FormalParameterBuilder formal,
|
||||
FormalParameterBuilder previous,
|
||||
) {
|
||||
addProblem(
|
||||
codePrivateNamedParameterDuplicatePublicName.withArgumentsOld(publicName),
|
||||
formal.fileOffset,
|
||||
formal.name.length,
|
||||
context: [
|
||||
codeDuplicatedParameterNameCause
|
||||
.withArgumentsOld(publicName)
|
||||
.withLocation(uri, previous.fileOffset, previous.name.length),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void handleNoFormalParameters(Token token, MemberKind kind) {
|
||||
push(token.charOffset);
|
||||
|
||||
@@ -163,17 +163,6 @@ front_end/UnterminatedToken/example: missingExample # This is a fall-back messag
|
||||
front_end/WasmImportOrExportInUserCode/example: missingExample # only issued by wasm build
|
||||
front_end/WebLiteralCannotBeRepresentedExactly/example: missingExample # only issued on web build
|
||||
|
||||
# An invalid private named parameter produces one of two errors depending on
|
||||
# whether the "private-named-parameters" experiment is enabled. By default with
|
||||
# the experiment off, it shows the old error (PrivateOptionalParameter), even
|
||||
# for the example in the new error code. Allow that for now.
|
||||
# TODO(rnystrom): Decide if we want to consolidate to one single error when the
|
||||
# experiment is closer to shipping.
|
||||
front_end/PrivateNamedNonFieldParameter/part_wrapped_script: hasOnlyUnrelatedMessages
|
||||
front_end/PrivateNamedNonFieldParameter/script: hasOnlyUnrelatedMessages
|
||||
front_end/PrivateNamedParameterWithoutPublicName/part_wrapped_script: hasOnlyUnrelatedMessages
|
||||
front_end/PrivateNamedParameterWithoutPublicName/script: hasOnlyUnrelatedMessages
|
||||
|
||||
# Can we do better?
|
||||
_fe_analyzer_shared/ConstAndFinal/declaration3: hasOnlyUnrelatedMessages # maybe the parser should do better here - it seems it once did?
|
||||
_fe_analyzer_shared/ConstAndFinal/declaration4: hasOnlyUnrelatedMessages # maybe the parser should do better here - it seems it once did?
|
||||
|
||||
@@ -1575,18 +1575,31 @@ PrivateNamedNonFieldParameter:
|
||||
pseudoSharedCode: PRIVATE_NAMED_NON_FIELD_PARAMETER
|
||||
parameters: none
|
||||
problemMessage: "A named parameter that doesn't refer to an instance variable can't start with an underscore ('_')."
|
||||
experiments: private-named-parameters
|
||||
script: |
|
||||
void foo({int? _hello}) {}
|
||||
|
||||
PrivateNamedParameterWithoutPublicName:
|
||||
parameters: none
|
||||
problemMessage: "A private named parameter must have a corresponding public name."
|
||||
experiments: private-named-parameters
|
||||
script: |
|
||||
class C {
|
||||
int? _123;
|
||||
C({this._123});
|
||||
}
|
||||
|
||||
PrivateNamedParameterDuplicatePublicName:
|
||||
parameters:
|
||||
String name: the corresponding public name of private named parameter
|
||||
problemMessage: "The corresponding public name '#name' is already the name of another parameter."
|
||||
experiments: private-named-parameters
|
||||
script: |
|
||||
class C {
|
||||
int? _x;
|
||||
C(int x, {this._x});
|
||||
}
|
||||
|
||||
GetterWithFormals:
|
||||
pseudoSharedCode: GETTER_WITH_PARAMETERS
|
||||
parameters: none
|
||||
|
||||
@@ -524,6 +524,8 @@ collection
|
||||
collections
|
||||
collector
|
||||
collects
|
||||
collide
|
||||
colliding
|
||||
colon
|
||||
colons
|
||||
color
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// 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 a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
/// Colliding initializing formals.
|
||||
class C1 {
|
||||
final String? _foo;
|
||||
C1({required this._foo, required this._foo}) {}
|
||||
}
|
||||
|
||||
/// Collide with previous public initializing formal.
|
||||
class C2 {
|
||||
final String? _foo;
|
||||
C2({required this._foo, String? _foo}) {}
|
||||
}
|
||||
|
||||
/// Collide with later private named.
|
||||
class C3 {
|
||||
final String? _foo;
|
||||
C3({required this._foo, String? foo}) {}
|
||||
}
|
||||
|
||||
/// Collide with later public named.
|
||||
class C4 {
|
||||
final String? _foo;
|
||||
C4({String? _foo, required this._foo}) {}
|
||||
}
|
||||
|
||||
/// Collide with previous private named.
|
||||
class C5 {
|
||||
final String? _foo;
|
||||
C5(String _foo, {required this._foo}) {}
|
||||
}
|
||||
|
||||
/// Collide with previous public named.
|
||||
class C6 {
|
||||
final String? foo;
|
||||
final String? _foo;
|
||||
C6({required this.foo, required this._foo}) {}
|
||||
}
|
||||
|
||||
/// Collide with previous private positional.
|
||||
class C7 {
|
||||
final String? _foo;
|
||||
C7({String? foo, required this._foo}) {}
|
||||
}
|
||||
|
||||
/// Collide with previous public positional.
|
||||
class C8 {
|
||||
final String? _foo;
|
||||
C8(String? foo, {required this._foo}) {}
|
||||
}
|
||||
|
||||
/// More than two parameters.
|
||||
class C9 {
|
||||
final String? _foo;
|
||||
C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: Duplicated parameter name '_foo'.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:21: Context: Other parameter named '_foo'.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:35: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:35: Error: Duplicated parameter name '_foo'.
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:21: Context: Other parameter named '_foo'.
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:20:21: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C3({required this._foo, String? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:20:35: Context: Other parameter named 'foo'.
|
||||
// C3({required this._foo, String? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:15: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:35: Error: Duplicated parameter name '_foo'.
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:15: Context: Other parameter named '_foo'.
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:32:34: Error: Duplicated parameter name '_foo'.
|
||||
// C5(String _foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:32:13: Context: Other parameter named '_foo'.
|
||||
// C5(String _foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:39:40: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C6({required this.foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:39:21: Context: Other parameter named 'foo'.
|
||||
// C6({required this.foo, required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:45:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C7({String? foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:45:15: Context: Other parameter named 'foo'.
|
||||
// C7({String? foo, required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:51:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C8(String? foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:51:14: Context: Other parameter named 'foo'.
|
||||
// C8(String? foo, {required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:45: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:45: Error: Duplicated parameter name '_foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:34: Context: Other parameter named '_foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:56: Error: Duplicated parameter name 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:14: Context: Other parameter named 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:14: Context: Other parameter named 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: '_foo' was already initialized by this constructor.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C1 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, required core::String? foo}) → self::C1
|
||||
: self::C1::_foo = foo, final dynamic #t1 = invalid-expression "pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: '_foo' was already initialized by this constructor.
|
||||
C1({required this._foo, required this._foo}) {}
|
||||
^", super core::Object::•() {}
|
||||
}
|
||||
class C2 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, core::String? _foo = #C1}) → self::C2
|
||||
: self::C2::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C3 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, core::String? foo = #C1}) → self::C3
|
||||
: self::C3::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C4 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({core::String? _foo = #C1, required core::String? foo}) → self::C4
|
||||
: self::C4::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C5 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String _foo, {required core::String? foo}) → self::C5
|
||||
: self::C5::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C6 extends core::Object {
|
||||
final field core::String? foo;
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, required core::String? foo}) → self::C6
|
||||
: self::C6::foo = foo, self::C6::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C7 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({core::String? foo = #C1, required core::String? foo}) → self::C7
|
||||
: self::C7::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C8 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String? foo, {required core::String? foo}) → self::C8
|
||||
: self::C8::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C9 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String? foo, {required core::String? foo, core::int? _foo = #C1, core::int? foo = #C1}) → self::C9
|
||||
: self::C9::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: Duplicated parameter name '_foo'.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:21: Context: Other parameter named '_foo'.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:35: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:35: Error: Duplicated parameter name '_foo'.
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:21: Context: Other parameter named '_foo'.
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:20:21: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C3({required this._foo, String? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:20:35: Context: Other parameter named 'foo'.
|
||||
// C3({required this._foo, String? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:15: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:35: Error: Duplicated parameter name '_foo'.
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:15: Context: Other parameter named '_foo'.
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:32:34: Error: Duplicated parameter name '_foo'.
|
||||
// C5(String _foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:32:13: Context: Other parameter named '_foo'.
|
||||
// C5(String _foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:39:40: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C6({required this.foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:39:21: Context: Other parameter named 'foo'.
|
||||
// C6({required this.foo, required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:45:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C7({String? foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:45:15: Context: Other parameter named 'foo'.
|
||||
// C7({String? foo, required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:51:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C8(String? foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:51:14: Context: Other parameter named 'foo'.
|
||||
// C8(String? foo, {required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:45: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:45: Error: Duplicated parameter name '_foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:34: Context: Other parameter named '_foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:56: Error: Duplicated parameter name 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:14: Context: Other parameter named 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:14: Context: Other parameter named 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: '_foo' was already initialized by this constructor.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C1 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, required core::String? foo}) → self::C1
|
||||
: self::C1::_foo = foo, final dynamic #t1 = invalid-expression "pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: '_foo' was already initialized by this constructor.
|
||||
C1({required this._foo, required this._foo}) {}
|
||||
^", super core::Object::•() {}
|
||||
}
|
||||
class C2 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, core::String? _foo = #C1}) → self::C2
|
||||
: self::C2::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C3 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, core::String? foo = #C1}) → self::C3
|
||||
: self::C3::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C4 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({core::String? _foo = #C1, required core::String? foo}) → self::C4
|
||||
: self::C4::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C5 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String _foo, {required core::String? foo}) → self::C5
|
||||
: self::C5::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C6 extends core::Object {
|
||||
final field core::String? foo;
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, required core::String? foo}) → self::C6
|
||||
: self::C6::foo = foo, self::C6::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C7 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({core::String? foo = #C1, required core::String? foo}) → self::C7
|
||||
: self::C7::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C8 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String? foo, {required core::String? foo}) → self::C8
|
||||
: self::C8::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C9 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String? foo, {required core::String? foo, core::int? _foo = #C1, core::int? foo = #C1}) → self::C9
|
||||
: self::C9::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: Duplicated parameter name '_foo'.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:21: Context: Other parameter named '_foo'.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:35: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:35: Error: Duplicated parameter name '_foo'.
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:21: Context: Other parameter named '_foo'.
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:20:21: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C3({required this._foo, String? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:20:35: Context: Other parameter named 'foo'.
|
||||
// C3({required this._foo, String? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:15: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:35: Error: Duplicated parameter name '_foo'.
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:15: Context: Other parameter named '_foo'.
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:32:34: Error: Duplicated parameter name '_foo'.
|
||||
// C5(String _foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:32:13: Context: Other parameter named '_foo'.
|
||||
// C5(String _foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:39:40: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C6({required this.foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:39:21: Context: Other parameter named 'foo'.
|
||||
// C6({required this.foo, required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:45:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C7({String? foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:45:15: Context: Other parameter named 'foo'.
|
||||
// C7({String? foo, required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:51:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C8(String? foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:51:14: Context: Other parameter named 'foo'.
|
||||
// C8(String? foo, {required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:45: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:45: Error: Duplicated parameter name '_foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:34: Context: Other parameter named '_foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:56: Error: Duplicated parameter name 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:14: Context: Other parameter named 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:14: Context: Other parameter named 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C1 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, required core::String? foo}) → self::C1
|
||||
;
|
||||
}
|
||||
class C2 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, core::String? _foo = null}) → self::C2
|
||||
;
|
||||
}
|
||||
class C3 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, core::String? foo = null}) → self::C3
|
||||
;
|
||||
}
|
||||
class C4 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({core::String? _foo = null, required core::String? foo}) → self::C4
|
||||
;
|
||||
}
|
||||
class C5 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String _foo, {required core::String? foo}) → self::C5
|
||||
;
|
||||
}
|
||||
class C6 extends core::Object {
|
||||
final field core::String? foo;
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, required core::String? foo}) → self::C6
|
||||
;
|
||||
}
|
||||
class C7 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({core::String? foo = null, required core::String? foo}) → self::C7
|
||||
;
|
||||
}
|
||||
class C8 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String? foo, {required core::String? foo}) → self::C8
|
||||
;
|
||||
}
|
||||
class C9 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String? foo, {required core::String? foo, core::int? _foo = null, core::int? foo = null}) → self::C9
|
||||
;
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: Duplicated parameter name '_foo'.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:21: Context: Other parameter named '_foo'.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:35: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:35: Error: Duplicated parameter name '_foo'.
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:14:21: Context: Other parameter named '_foo'.
|
||||
// C2({required this._foo, String? _foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:20:21: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C3({required this._foo, String? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:20:35: Context: Other parameter named 'foo'.
|
||||
// C3({required this._foo, String? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:15: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:35: Error: Duplicated parameter name '_foo'.
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:26:15: Context: Other parameter named '_foo'.
|
||||
// C4({String? _foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:32:34: Error: Duplicated parameter name '_foo'.
|
||||
// C5(String _foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:32:13: Context: Other parameter named '_foo'.
|
||||
// C5(String _foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:39:40: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C6({required this.foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:39:21: Context: Other parameter named 'foo'.
|
||||
// C6({required this.foo, required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:45:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C7({String? foo, required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:45:15: Context: Other parameter named 'foo'.
|
||||
// C7({String? foo, required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:51:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C8(String? foo, {required this._foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:51:14: Context: Other parameter named 'foo'.
|
||||
// C8(String? foo, {required this._foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:45: Error: A named parameter that doesn't refer to an instance variable can't start with an underscore ('_').
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:45: Error: Duplicated parameter name '_foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:34: Context: Other parameter named '_foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:56: Error: Duplicated parameter name 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:14: Context: Other parameter named 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:34: Error: The corresponding public name 'foo' is already the name of another parameter.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:57:14: Context: Other parameter named 'foo'.
|
||||
// C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: '_foo' was already initialized by this constructor.
|
||||
// C1({required this._foo, required this._foo}) {}
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C1 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, required core::String? foo}) → self::C1
|
||||
: self::C1::_foo = foo, final dynamic #t1 = invalid-expression "pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart:8:41: Error: '_foo' was already initialized by this constructor.
|
||||
C1({required this._foo, required this._foo}) {}
|
||||
^", super core::Object::•() {}
|
||||
}
|
||||
class C2 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, core::String? _foo = #C1}) → self::C2
|
||||
: self::C2::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C3 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, core::String? foo = #C1}) → self::C3
|
||||
: self::C3::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C4 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({core::String? _foo = #C1, required core::String? foo}) → self::C4
|
||||
: self::C4::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C5 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String _foo, {required core::String? foo}) → self::C5
|
||||
: self::C5::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C6 extends core::Object {
|
||||
final field core::String? foo;
|
||||
final field core::String? _foo;
|
||||
constructor •({required core::String? foo, required core::String? foo}) → self::C6
|
||||
: self::C6::foo = foo, self::C6::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C7 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •({core::String? foo = #C1, required core::String? foo}) → self::C7
|
||||
: self::C7::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C8 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String? foo, {required core::String? foo}) → self::C8
|
||||
: self::C8::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
class C9 extends core::Object {
|
||||
final field core::String? _foo;
|
||||
constructor •(core::String? foo, {required core::String? foo, core::int? _foo = #C1, core::int? foo = #C1}) → self::C9
|
||||
: self::C9::_foo = foo, super core::Object::•() {}
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
class C1 {
|
||||
final String? _foo;
|
||||
C1({required this._foo, required this._foo}) {}
|
||||
}
|
||||
|
||||
class C2 {
|
||||
final String? _foo;
|
||||
C2({required this._foo, String? _foo}) {}
|
||||
}
|
||||
|
||||
class C3 {
|
||||
final String? _foo;
|
||||
C3({required this._foo, String? foo}) {}
|
||||
}
|
||||
|
||||
class C4 {
|
||||
final String? _foo;
|
||||
C4({String? _foo, required this._foo}) {}
|
||||
}
|
||||
|
||||
class C5 {
|
||||
final String? _foo;
|
||||
C5(String _foo, {required this._foo}) {}
|
||||
}
|
||||
|
||||
class C6 {
|
||||
final String? foo;
|
||||
final String? _foo;
|
||||
C6({required this.foo, required this._foo}) {}
|
||||
}
|
||||
|
||||
class C7 {
|
||||
final String? _foo;
|
||||
C7({String? foo, required this._foo}) {}
|
||||
}
|
||||
|
||||
class C8 {
|
||||
final String? _foo;
|
||||
C8(String? foo, {required this._foo}) {}
|
||||
}
|
||||
|
||||
class C9 {
|
||||
final String? _foo;
|
||||
C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
class C1 {
|
||||
C1({required this._foo, required this._foo}) {}
|
||||
final String? _foo;
|
||||
}
|
||||
|
||||
class C2 {
|
||||
C2({required this._foo, String? _foo}) {}
|
||||
final String? _foo;
|
||||
}
|
||||
|
||||
class C3 {
|
||||
C3({required this._foo, String? foo}) {}
|
||||
final String? _foo;
|
||||
}
|
||||
|
||||
class C4 {
|
||||
C4({String? _foo, required this._foo}) {}
|
||||
final String? _foo;
|
||||
}
|
||||
|
||||
class C5 {
|
||||
C5(String _foo, {required this._foo}) {}
|
||||
final String? _foo;
|
||||
}
|
||||
|
||||
class C6 {
|
||||
C6({required this.foo, required this._foo}) {}
|
||||
final String? _foo;
|
||||
final String? foo;
|
||||
}
|
||||
|
||||
class C7 {
|
||||
C7({String? foo, required this._foo}) {}
|
||||
final String? _foo;
|
||||
}
|
||||
|
||||
class C8 {
|
||||
C8(String? foo, {required this._foo}) {}
|
||||
final String? _foo;
|
||||
}
|
||||
|
||||
class C9 {
|
||||
C9(String? foo, {required this._foo, int? _foo, int? foo}) {}
|
||||
final String? _foo;
|
||||
}
|
||||
Reference in New Issue
Block a user