[cfe] Report extension access type parameter bounds before lowering

This changes the checking of type parameter bounds to be performed before lowering.

Change-Id: I4f6753359b68c9d5e7daa74be8958d3be8b6c104
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447781
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
This commit is contained in:
Johnni Winther
2025-09-01 03:59:59 -07:00
committed by Commit Queue
parent 101fcad9d4
commit e2fb9e7ef7
15 changed files with 1232 additions and 1063 deletions
@@ -527,21 +527,6 @@ class VariableUseGenerator extends Generator {
forEffect: voidContext,
isPost: true,
);
/*
Expression value = _forest.createIntLiteral(operatorOffset, 1);
if (voidContext) {
return buildCompoundAssignment(binaryOperator, value,
operatorOffset: operatorOffset,
voidContext: voidContext,
isPostIncDec: true);
}
VariableDeclarationImpl read =
_helper.createVariableDeclarationForValue(_createRead());
Expression binary = _helper.forest.createBinary(operatorOffset,
_helper.createVariableGet(read, fileOffset), binaryOperator, value);
VariableDeclarationImpl write = _helper.createVariableDeclarationForValue(
_createWrite(operatorOffset, binary));
return new LocalIncDec(read, write)..fileOffset = operatorOffset;*/
}
@override
@@ -2690,7 +2675,7 @@ class ExtensionInstanceAccessGenerator extends Generator {
class ExplicitExtensionInstanceAccessGenerator extends Generator {
/// The file offset used for the explicit extension application type
/// arguments.
final int extensionTypeArgumentOffset;
final int? extensionTypeArgumentOffset;
final Extension extension;
@@ -2752,37 +2737,37 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
),
super(helper, token);
factory ExplicitExtensionInstanceAccessGenerator.fromBuilder(
ExpressionGeneratorHelper helper,
Token token,
int extensionTypeArgumentOffset,
Extension extension,
Name targetName,
MemberBuilder? getterBuilder,
MemberBuilder? setterBuilder,
Expression receiver,
List<DartType>? explicitTypeArguments,
int extensionTypeParameterCount, {
factory ExplicitExtensionInstanceAccessGenerator.fromBuilder({
required ExpressionGeneratorHelper helper,
required Token token,
required int? extensionTypeArgumentOffset,
required Extension extension,
required Name name,
required MemberBuilder? getter,
required MemberBuilder? setter,
required Expression receiver,
required List<DartType>? explicitTypeArguments,
required int extensionTypeParameterCount,
required bool isNullAware,
}) {
assert(getterBuilder != null || setterBuilder != null);
assert(getter != null || setter != null);
Procedure? readTarget;
Procedure? invokeTarget;
if (getterBuilder != null) {
assert(!getterBuilder.isStatic);
if (getterBuilder is PropertyBuilder) {
assert(!getterBuilder.hasConcreteField);
readTarget = getterBuilder.readTarget as Procedure?;
} else if (getterBuilder is MethodBuilder) {
if (getterBuilder.isOperator) {
invokeTarget = getterBuilder.invokeTarget as Procedure?;
if (getter != null) {
assert(!getter.isStatic);
if (getter is PropertyBuilder) {
assert(!getter.hasConcreteField);
readTarget = getter.readTarget as Procedure?;
} else if (getter is MethodBuilder) {
if (getter.isOperator) {
invokeTarget = getter.invokeTarget as Procedure?;
} else {
readTarget = getterBuilder.readTarget as Procedure?;
invokeTarget = getterBuilder.invokeTarget as Procedure?;
readTarget = getter.readTarget as Procedure?;
invokeTarget = getter.invokeTarget as Procedure?;
}
} else {
return unhandled(
"$getterBuilder (${getterBuilder.runtimeType})",
"$getter (${getter.runtimeType})",
"InstanceExtensionAccessGenerator.fromBuilder",
offsetForToken(token),
helper.uri,
@@ -2790,15 +2775,15 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
}
}
Procedure? writeTarget;
if (setterBuilder != null) {
assert(!setterBuilder.isStatic);
if (setterBuilder is PropertyBuilder) {
if (setterBuilder.hasSetter) {
writeTarget = setterBuilder.writeTarget as Procedure?;
if (setter != null) {
assert(!setter.isStatic);
if (setter is PropertyBuilder) {
if (setter.hasSetter) {
writeTarget = setter.writeTarget as Procedure?;
}
} else {
return unhandled(
"$setterBuilder (${setterBuilder.runtimeType})",
"$setter (${setter.runtimeType})",
"InstanceExtensionAccessGenerator.fromBuilder",
offsetForToken(token),
helper.uri,
@@ -2810,7 +2795,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
token,
extensionTypeArgumentOffset,
extension,
targetName,
name,
readTarget,
invokeTarget,
writeTarget,
@@ -2853,6 +2838,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
name: targetName,
tearOff: getter,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = fileOffset;
} else {
return new ExtensionGet.explicit(
@@ -2862,6 +2848,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
name: targetName,
getter: getter,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = fileOffset;
}
}
@@ -2898,6 +2885,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
value: value,
forEffect: forEffect,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = offset;
}
}
@@ -2930,6 +2918,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
binaryOffset: offset,
writeOffset: fileOffset,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = offset;
}
@@ -2964,6 +2953,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
binaryOffset: operatorOffset,
writeOffset: fileOffset,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = operatorOffset;
}
@@ -2992,6 +2982,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
isInc: binaryOperator == plusName,
forEffect: forEffect,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = operatorOffset;
}
@@ -3107,7 +3098,7 @@ class ExplicitExtensionInstanceAccessGenerator extends Generator {
class ExplicitExtensionIndexedAccessGenerator extends Generator {
/// The file offset used for the explicit extension application type
/// arguments.
final int extensionTypeArgumentOffset;
final int? extensionTypeArgumentOffset;
final Extension extension;
@@ -3155,7 +3146,7 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
factory ExplicitExtensionIndexedAccessGenerator.fromBuilder(
ExpressionGeneratorHelper helper,
Token token,
int extensionTypeArgumentOffset,
int? extensionTypeArgumentOffset,
Extension extension,
MemberBuilder? getterBuilder,
MemberBuilder? setterBuilder,
@@ -3204,6 +3195,7 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
getter,
index,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = fileOffset;
}
@@ -3223,6 +3215,7 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
value,
isNullAware: isNullAware,
forEffect: voidContext,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = fileOffset;
}
@@ -3255,6 +3248,7 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
writeOffset: fileOffset,
forEffect: voidContext,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
)..fileOffset = offset;
}
@@ -3291,6 +3285,7 @@ class ExplicitExtensionIndexedAccessGenerator extends Generator {
forEffect: voidContext,
forPostIncDec: isPostIncDec,
isNullAware: isNullAware,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
);
}
@@ -3380,14 +3375,16 @@ class ExplicitExtensionAccessGenerator extends Generator {
final ExtensionBuilder extensionBuilder;
final Expression receiver;
final List<DartType>? explicitTypeArguments;
final int? extensionTypeArgumentOffset;
ExplicitExtensionAccessGenerator(
ExpressionGeneratorHelper helper,
Token token,
this.extensionBuilder,
this.receiver,
this.explicitTypeArguments,
) : super(helper, token);
ExplicitExtensionAccessGenerator({
required ExpressionGeneratorHelper helper,
required Token token,
required this.extensionBuilder,
required this.receiver,
required this.explicitTypeArguments,
required this.extensionTypeArgumentOffset,
}) : super(helper, token);
@override
// Coverage-ignore(suite): Not run.
@@ -3471,19 +3468,16 @@ class ExplicitExtensionAccessGenerator extends Generator {
);
}
return new ExplicitExtensionInstanceAccessGenerator.fromBuilder(
_helper,
token,
// TODO(johnniwinther): Improve this. This is the name of the extension
// and not the type arguments (or arguments if type arguments are
// omitted).
fileOffset,
extensionBuilder.extension,
name,
getter,
setter,
receiver,
explicitTypeArguments,
extensionBuilder.typeParameters?.length ?? 0,
helper: _helper,
token: token,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
extension: extensionBuilder.extension,
name: name,
getter: getter,
setter: setter,
receiver: receiver,
explicitTypeArguments: explicitTypeArguments,
extensionTypeParameterCount: extensionBuilder.typeParameters?.length ?? 0,
isNullAware: isNullAware,
);
}
@@ -3609,10 +3603,7 @@ class ExplicitExtensionAccessGenerator extends Generator {
return new ExplicitExtensionIndexedAccessGenerator.fromBuilder(
_helper,
token,
// TODO(johnniwinther): Improve this. This is the name of the extension
// and not the type arguments (or arguments if type arguments are
// omitted).
fileOffset,
extensionTypeArgumentOffset,
extensionBuilder.extension,
getter,
setter,
@@ -4551,6 +4542,7 @@ class TypeUseGenerator extends AbstractReadOnlyAccessGenerator {
List<DartType>? explicitTypeArguments = getExplicitTypeArguments(
arguments,
);
int? extensionTypeArgumentOffset;
if (explicitTypeArguments != null) {
int typeParameterCount = extensionBuilder.typeParameters?.length ?? 0;
if (explicitTypeArguments.length != typeParameterCount) {
@@ -4563,14 +4555,17 @@ class TypeUseGenerator extends AbstractReadOnlyAccessGenerator {
lengthForToken(token),
);
}
// TODO(johnniwinther): Provide the type arguments offsets.
extensionTypeArgumentOffset = arguments.fileOffset;
}
// TODO(johnniwinther): Check argument and type argument count.
return new ExplicitExtensionAccessGenerator(
_helper,
token,
declaration as ExtensionBuilder,
arguments.positional.single,
explicitTypeArguments,
helper: _helper,
token: token,
extensionBuilder: declaration as ExtensionBuilder,
receiver: arguments.positional.single,
explicitTypeArguments: explicitTypeArguments,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
);
} else {
return _helper.buildConstructorInvocation(
+69 -8
View File
@@ -96,6 +96,7 @@ class NoneInferredTypeArgumentsInfo extends TypeArgumentsInfo {
bool isInferred(int index) => false;
}
// Coverage-ignore(suite): Not run.
class ExtensionMethodTypeArgumentsInfo implements TypeArgumentsInfo {
final ArgumentsImpl arguments;
@@ -131,6 +132,7 @@ TypeArgumentsInfo getTypeArgumentsInfo(Arguments arguments) {
? const AllInferredTypeArgumentsInfo()
: const NoneInferredTypeArgumentsInfo();
} else {
// Coverage-ignore-block(suite): Not run.
return new ExtensionMethodTypeArgumentsInfo(arguments);
}
} else {
@@ -1435,6 +1437,9 @@ class ExtensionIfNullSet extends InternalExpression {
/// not implicit like `a ??= b` inside the extension `E`.
final bool _isExplicit;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionIfNullSet.explicit({
required Extension extension,
required List<DartType>? explicitTypeArguments,
@@ -1448,6 +1453,7 @@ class ExtensionIfNullSet extends InternalExpression {
required int binaryOffset,
required int writeOffset,
required bool isNullAware,
required int? extensionTypeArgumentOffset,
}) : this._(
extension,
explicitTypeArguments,
@@ -1462,6 +1468,7 @@ class ExtensionIfNullSet extends InternalExpression {
writeOffset: writeOffset,
isNullAware: isNullAware,
isExplicit: true,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
);
ExtensionIfNullSet.implicit({
@@ -1490,6 +1497,7 @@ class ExtensionIfNullSet extends InternalExpression {
writeOffset: writeOffset,
isNullAware: false,
isExplicit: false,
extensionTypeArgumentOffset: null,
);
ExtensionIfNullSet._(
@@ -1506,6 +1514,7 @@ class ExtensionIfNullSet extends InternalExpression {
required this.writeOffset,
required this.isNullAware,
required bool isExplicit,
required this.extensionTypeArgumentOffset,
}) : _isExplicit = isExplicit,
assert(
knownTypeArguments == null ||
@@ -1623,6 +1632,9 @@ class ExtensionCompoundSet extends InternalExpression {
/// not implicit like `a += b` inside the extension `E`.
final bool _isExplicit;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionCompoundSet.explicit({
required Extension extension,
required List<DartType>? explicitTypeArguments,
@@ -1637,6 +1649,7 @@ class ExtensionCompoundSet extends InternalExpression {
required int binaryOffset,
required int writeOffset,
required bool isNullAware,
required int? extensionTypeArgumentOffset,
}) : this._(
extension,
explicitTypeArguments,
@@ -1652,6 +1665,7 @@ class ExtensionCompoundSet extends InternalExpression {
writeOffset: writeOffset,
isNullAware: isNullAware,
isExplicit: true,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
);
ExtensionCompoundSet.implicit({
@@ -1682,6 +1696,7 @@ class ExtensionCompoundSet extends InternalExpression {
writeOffset: writeOffset,
isNullAware: false,
isExplicit: false,
extensionTypeArgumentOffset: null,
);
ExtensionCompoundSet._(
@@ -1699,6 +1714,7 @@ class ExtensionCompoundSet extends InternalExpression {
required this.writeOffset,
required this.isNullAware,
required bool isExplicit,
required this.extensionTypeArgumentOffset,
}) : _isExplicit = isExplicit,
assert(
knownTypeArguments == null ||
@@ -1972,6 +1988,9 @@ class ExtensionIncDec extends InternalExpression {
/// to the implicit access of `a++` occurring within the extension `E`.
final bool _isExplicit;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionIncDec.explicit({
required Extension extension,
required List<DartType>? explicitTypeArguments,
@@ -1982,7 +2001,8 @@ class ExtensionIncDec extends InternalExpression {
required bool isPost,
required bool isInc,
required bool forEffect,
required isNullAware,
required bool isNullAware,
required int? extensionTypeArgumentOffset,
}) : this._(
extension,
explicitTypeArguments,
@@ -1995,6 +2015,7 @@ class ExtensionIncDec extends InternalExpression {
forEffect: forEffect,
isNullAware: isNullAware,
isExplicit: true,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
);
ExtensionIncDec.implicit({
@@ -2019,6 +2040,7 @@ class ExtensionIncDec extends InternalExpression {
forEffect: forEffect,
isNullAware: false,
isExplicit: false,
extensionTypeArgumentOffset: null,
);
ExtensionIncDec._(
@@ -2033,10 +2055,10 @@ class ExtensionIncDec extends InternalExpression {
required this.forEffect,
required this.isNullAware,
required bool isExplicit,
required this.extensionTypeArgumentOffset,
}) : _isExplicit = isExplicit,
assert(
knownTypeArguments == null ||
// Coverage-ignore(suite): Not run.
extension.typeParameters.isNotEmpty &&
knownTypeArguments.length == extension.typeParameters.length,
) {
@@ -2505,6 +2527,9 @@ class ExtensionIndexGet extends InternalExpression {
/// `Extension(o)?[a]`.
final bool isNullAware;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionIndexGet(
this.extension,
this.explicitTypeArguments,
@@ -2512,6 +2537,7 @@ class ExtensionIndexGet extends InternalExpression {
this.getter,
this.index, {
required this.isNullAware,
required this.extensionTypeArgumentOffset,
}) : assert(
explicitTypeArguments == null ||
explicitTypeArguments.length == extension.typeParameters.length,
@@ -2595,6 +2621,9 @@ class ExtensionIndexSet extends InternalExpression {
/// If `true`, the expression is only need for effect and not for its value.
final bool forEffect;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionIndexSet(
this.extension,
this.explicitTypeArguments,
@@ -2604,6 +2633,7 @@ class ExtensionIndexSet extends InternalExpression {
this.value, {
required this.isNullAware,
required this.forEffect,
required this.extensionTypeArgumentOffset,
}) : assert(
explicitTypeArguments == null ||
explicitTypeArguments.length == extension.typeParameters.length,
@@ -2854,6 +2884,9 @@ class ExtensionIfNullIndexSet extends InternalExpression {
/// `E(o)?[a] ??= b`.
final bool isNullAware;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionIfNullIndexSet(
this.extension,
this.knownTypeArguments,
@@ -2867,6 +2900,7 @@ class ExtensionIfNullIndexSet extends InternalExpression {
required this.writeOffset,
required this.forEffect,
required this.isNullAware,
required this.extensionTypeArgumentOffset,
}) : assert(
knownTypeArguments == null ||
knownTypeArguments.length == extension.typeParameters.length,
@@ -3133,6 +3167,9 @@ class ExtensionCompoundIndexSet extends InternalExpression {
/// `Extension(o)?[a] += b`.
final bool isNullAware;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionCompoundIndexSet({
required this.extension,
required this.explicitTypeArguments,
@@ -3148,6 +3185,7 @@ class ExtensionCompoundIndexSet extends InternalExpression {
required this.forEffect,
required this.forPostIncDec,
required this.isNullAware,
required this.extensionTypeArgumentOffset,
}) : assert(
explicitTypeArguments == null ||
explicitTypeArguments.length == extension.typeParameters.length,
@@ -3234,6 +3272,9 @@ class ExtensionGet extends InternalExpression {
/// not implicit like `a` inside the extension `E`.
final bool _isExplicit;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionGet.implicit({
required Extension extension,
required List<DartType>? thisTypeArguments,
@@ -3248,6 +3289,7 @@ class ExtensionGet extends InternalExpression {
getter,
isNullAware: false,
isExplicit: false,
extensionTypeArgumentOffset: null,
);
ExtensionGet.explicit({
@@ -3257,6 +3299,7 @@ class ExtensionGet extends InternalExpression {
required Name name,
required Procedure getter,
required bool isNullAware,
required int? extensionTypeArgumentOffset,
}) : this._(
extension,
explicitTypeArguments,
@@ -3265,6 +3308,7 @@ class ExtensionGet extends InternalExpression {
getter,
isNullAware: isNullAware,
isExplicit: true,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
);
ExtensionGet._(
@@ -3275,6 +3319,7 @@ class ExtensionGet extends InternalExpression {
this.getter, {
required this.isNullAware,
required bool isExplicit,
required this.extensionTypeArgumentOffset,
}) : _isExplicit = isExplicit,
assert(
knownTypeArguments == null ||
@@ -3375,6 +3420,9 @@ class ExtensionSet extends InternalExpression {
/// not implicit like `a = b` inside the extension `E`.
final bool _isExplicit;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionSet.implicit({
required Extension extension,
required List<DartType>? thisTypeArguments,
@@ -3393,6 +3441,7 @@ class ExtensionSet extends InternalExpression {
forEffect: forEffect,
isNullAware: false,
isExplicit: false,
extensionTypeArgumentOffset: null,
);
ExtensionSet.explicit({
@@ -3404,6 +3453,7 @@ class ExtensionSet extends InternalExpression {
required Expression value,
required bool forEffect,
required bool isNullAware,
required int? extensionTypeArgumentOffset,
}) : this._(
extension,
explicitTypeArguments,
@@ -3414,6 +3464,7 @@ class ExtensionSet extends InternalExpression {
forEffect: forEffect,
isNullAware: isNullAware,
isExplicit: true,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
);
ExtensionSet._(
@@ -3426,6 +3477,7 @@ class ExtensionSet extends InternalExpression {
required this.forEffect,
required this.isNullAware,
required bool isExplicit,
required this.extensionTypeArgumentOffset,
}) : _isExplicit = isExplicit,
assert(
knownTypeArguments == null ||
@@ -3511,7 +3563,8 @@ class ExtensionMethodInvocation extends InternalExpression {
/// `Extension(o)?.a()`.
final bool isNullAware;
final int extensionTypeArgumentOffset;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionMethodInvocation.implicit({
required Extension extension,
@@ -3528,7 +3581,7 @@ class ExtensionMethodInvocation extends InternalExpression {
arguments,
isExplicit: false,
knownTypeArguments: thisTypeArguments,
extensionTypeArgumentOffset: -1,
extensionTypeArgumentOffset: null,
isNullAware: false,
);
@@ -3539,7 +3592,7 @@ class ExtensionMethodInvocation extends InternalExpression {
required Procedure target,
required ArgumentsImpl arguments,
required List<DartType>? explicitTypeArguments,
required int extensionTypeArgumentOffset,
required int? extensionTypeArgumentOffset,
required bool isNullAware,
}) : this._(
extension,
@@ -3648,7 +3701,8 @@ class ExtensionGetterInvocation extends InternalExpression {
/// `Extension(o)?.a()`.
final bool isNullAware;
final int extensionTypeArgumentOffset;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionGetterInvocation.implicit({
required Extension extension,
@@ -3665,7 +3719,7 @@ class ExtensionGetterInvocation extends InternalExpression {
arguments,
isExplicit: false,
knownTypeArguments: thisTypeArguments,
extensionTypeArgumentOffset: -1,
extensionTypeArgumentOffset: null,
isNullAware: false,
);
@@ -3676,7 +3730,7 @@ class ExtensionGetterInvocation extends InternalExpression {
required Procedure target,
required ArgumentsImpl arguments,
required List<DartType>? explicitTypeArguments,
required int extensionTypeArgumentOffset,
required int? extensionTypeArgumentOffset,
required bool isNullAware,
}) : this._(
extension,
@@ -3782,6 +3836,9 @@ class ExtensionTearOff extends InternalExpression {
/// not implicit like `a` inside the extension `E`.
final bool _isExplicit;
/// File offset of the explicit extension type arguments, if provided.
final int? extensionTypeArgumentOffset;
ExtensionTearOff.implicit({
required Extension extension,
required List<DartType>? thisTypeArguments,
@@ -3796,6 +3853,7 @@ class ExtensionTearOff extends InternalExpression {
tearOff,
isNullAware: false,
isExplicit: false,
extensionTypeArgumentOffset: null,
);
ExtensionTearOff.explicit({
@@ -3805,6 +3863,7 @@ class ExtensionTearOff extends InternalExpression {
required Name name,
required Procedure tearOff,
required bool isNullAware,
required int? extensionTypeArgumentOffset,
}) : this._(
extension,
explicitTypeArguments,
@@ -3813,6 +3872,7 @@ class ExtensionTearOff extends InternalExpression {
tearOff,
isNullAware: isNullAware,
isExplicit: true,
extensionTypeArgumentOffset: extensionTypeArgumentOffset,
);
ExtensionTearOff._(
@@ -3823,6 +3883,7 @@ class ExtensionTearOff extends InternalExpression {
this.tearOff, {
required this.isNullAware,
required bool isExplicit,
required this.extensionTypeArgumentOffset,
}) : _isExplicit = isExplicit,
assert(
knownTypeArguments == null ||
@@ -1694,21 +1694,17 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
);
}
void checkBoundsInStaticInvocation(
StaticInvocation node,
Name targetName,
TypeEnvironment typeEnvironment,
Uri fileUri,
TypeArgumentsInfo typeArgumentsInfo,
) {
// TODO(johnniwinther): Handle partially inferred type arguments in
// extension method calls. Currently all are considered inferred in the
// error messages.
if (node.arguments.types.isEmpty) return;
Class? klass = node.target.enclosingClass;
List<TypeParameter> parameters = node.target.function.typeParameters;
List<DartType> arguments = node.arguments.types;
if (parameters.length != arguments.length) {
void checkBoundsInStaticInvocation({
required String targetName,
required TypeEnvironment typeEnvironment,
required Uri fileUri,
required List<TypeParameter> typeParameters,
required List<DartType> typeArguments,
required TypeArgumentsInfo typeArgumentsInfo,
required int fileOffset,
}) {
if (typeArguments.isEmpty) return;
if (typeParameters.length != typeArguments.length) {
assert(
loader.assertProblemReportedElsewhere(
"SourceLibraryBuilder.checkBoundsInStaticInvocation: "
@@ -1721,28 +1717,19 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
final DartType bottomType = const NeverType.nonNullable();
List<TypeArgumentIssue> issues = findTypeArgumentIssuesForInvocation(
parameters,
arguments,
typeParameters,
typeArguments,
typeEnvironment,
bottomType,
areGenericArgumentsAllowed: libraryFeatures.genericMetadata.isEnabled,
);
if (issues.isNotEmpty) {
DartType? targetReceiver;
if (klass != null) {
// Coverage-ignore-block(suite): Not run.
targetReceiver = new InterfaceType(
klass,
klass.enclosingLibrary.nonNullable,
);
}
_reportTypeArgumentIssues(
issues,
fileUri,
node.fileOffset,
fileOffset,
typeArgumentsInfo: typeArgumentsInfo,
targetReceiver: targetReceiver,
targetName: targetName.text,
targetName: targetName,
);
}
}
@@ -1468,6 +1468,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
extensionTypeArguments,
@@ -1490,16 +1502,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase
fileOffset: node.fileOffset,
);
libraryBuilder.checkBoundsInStaticInvocation(
replacement,
node.name,
typeSchemaEnvironment,
helper.uri,
node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
);
return instantiateTearOff(
target.getReturnType(this),
typeContext,
@@ -1541,6 +1543,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
extensionTypeArguments,
@@ -1565,16 +1579,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase
fileOffset: node.fileOffset,
);
libraryBuilder.checkBoundsInStaticInvocation(
replacement,
node.name,
typeSchemaEnvironment,
helper.uri,
node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
);
return new ExpressionInferenceResult(resultType, replacement);
}
@@ -1612,6 +1616,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
extensionTypeArguments,
@@ -1660,16 +1676,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase
fileOffset: node.fileOffset,
);
libraryBuilder.checkBoundsInStaticInvocation(
assignment,
node.name,
typeSchemaEnvironment,
helper.uri,
node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
);
Expression replacement;
if (node.forEffect) {
assert(receiverVariable == null);
@@ -1727,6 +1733,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
extensionTypeArguments,
@@ -1769,16 +1787,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase
fileOffset: node.fileOffset,
);
libraryBuilder.checkBoundsInStaticInvocation(
read,
node.name,
typeSchemaEnvironment,
helper.uri,
node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
);
Expression value = read;
DartType readType = readTarget.getGetterType(this);
@@ -1895,6 +1903,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
extensionTypeArguments,
@@ -1966,6 +1986,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
extensionTypeArguments,
@@ -1992,6 +2024,21 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType: receiverType,
);
TypeArgumentsInfo typeArgumentsInfo = getTypeArgumentsInfo(node.arguments);
String targetName = node.name.text;
if (!node.extension.isUnnamedExtension) {
targetName = '${node.extension.name}.${targetName}';
}
libraryBuilder.checkBoundsInStaticInvocation(
targetName: targetName,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.fileOffset,
typeArgumentsInfo: typeArgumentsInfo,
typeParameters: target.getTypeParameters(),
typeArguments: node.arguments.types,
);
ArgumentsImpl extensionInvocationArguments =
createExtensionInvocationArgument(target, receiver, node.arguments);
StaticInvocation replacement = createStaticInvocation(
@@ -2000,17 +2047,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase
fileOffset: node.fileOffset,
);
TypeArgumentsInfo typeArgumentsInfo = getTypeArgumentsInfo(
extensionInvocationArguments,
);
libraryBuilder.checkBoundsInStaticInvocation(
replacement,
node.name,
typeSchemaEnvironment,
helper.uri,
typeArgumentsInfo,
);
return new ExpressionInferenceResult(
result.inferredType,
result.applyResult(replacement, extensionReceiverType: receiverType),
@@ -2051,6 +2087,17 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
@@ -2226,6 +2273,17 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
@@ -7827,12 +7885,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
member,
node.arguments,
);
String targetName = member.name.text;
if (member.enclosingClass != null) {
targetName = '${member.enclosingClass!.name}.$targetName';
}
libraryBuilder.checkBoundsInStaticInvocation(
invocation,
member.name,
typeSchemaEnvironment,
helper.uri,
typeArgumentsInfo,
targetName: targetName,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.fileOffset,
typeArgumentsInfo: typeArgumentsInfo,
typeParameters: invocation.target.typeParameters,
typeArguments: invocation.arguments.types,
);
return new ExpressionInferenceResult(
result.inferredType,
@@ -8922,6 +8986,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.explicitTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
extensionTypeArguments,
@@ -8960,16 +9036,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase
fileOffset: node.fileOffset,
);
libraryBuilder.checkBoundsInStaticInvocation(
replacement,
indexSetName,
typeSchemaEnvironment,
helper.uri,
node.explicitTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
);
return new ExpressionInferenceResult(resultType, replacement);
}
@@ -9007,6 +9073,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.explicitTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
extensionTypeArguments,
@@ -9076,16 +9154,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase
fileOffset: node.fileOffset,
);
libraryBuilder.checkBoundsInStaticInvocation(
assignment,
indexSetName,
typeSchemaEnvironment,
helper.uri,
node.explicitTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
);
Expression replacement = assignment;
if (returnedValue != null) {
assert(!node.forEffect);
@@ -9529,6 +9597,17 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverResult.inferredType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.knownTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
Expression receiver = receiverResult.expression;
DartType receiverType = receiverResult.inferredType;
@@ -11236,6 +11315,17 @@ class InferenceVisitorImpl extends InferenceVisitorBase
receiverType,
treeNodeForTesting: node,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: node.extension.name,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.extensionTypeArgumentOffset ?? node.fileOffset,
typeArgumentsInfo: node.explicitTypeArguments != null
? const NoneInferredTypeArgumentsInfo()
: const AllInferredTypeArgumentsInfo(),
typeParameters: node.extension.typeParameters,
typeArguments: extensionTypeArguments,
);
DartType extensionOnType = getExtensionReceiverType(
node.extension,
@@ -12161,12 +12251,18 @@ class InferenceVisitorImpl extends InferenceVisitorBase
node.arguments as ArgumentsImpl,
staticTarget: node.target,
);
String targetName = node.name.text;
if (node.target.enclosingClass != null) {
targetName = '${node.target.enclosingClass!.name}.$targetName';
}
libraryBuilder.checkBoundsInStaticInvocation(
node,
node.name,
typeSchemaEnvironment,
helper.uri,
typeArgumentsInfo,
targetName: targetName,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: node.fileOffset,
typeArgumentsInfo: typeArgumentsInfo,
typeParameters: node.target.typeParameters,
typeArguments: node.arguments.types,
);
return new ExpressionInferenceResult(
result.inferredType,
@@ -2847,6 +2847,16 @@ abstract class InferenceVisitorBase implements InferenceVisitor {
receiverType: receiverType,
isImplicitCall: isImplicitCall,
);
libraryBuilder.checkBoundsInStaticInvocation(
targetName: name.text,
typeEnvironment: typeSchemaEnvironment,
fileUri: helper.uri,
fileOffset: fileOffset,
typeArgumentsInfo: getTypeArgumentsInfo(arguments),
typeParameters: target.getTypeParameters(),
typeArguments: arguments.types,
);
ArgumentsImpl extensionInvocationArguments =
createExtensionInvocationArgument(target, receiver, arguments);
StaticInvocation staticInvocation = createExtensionInvocation(
@@ -2854,13 +2864,6 @@ abstract class InferenceVisitorBase implements InferenceVisitor {
target,
extensionInvocationArguments,
);
libraryBuilder.checkBoundsInStaticInvocation(
staticInvocation,
name,
typeSchemaEnvironment,
helper.uri,
getTypeArgumentsInfo(arguments),
);
Expression replacement = result.applyResult(
staticInvocation,
@@ -606,6 +606,24 @@ abstract class ObjectAccessTarget {
///
InvocationTargetType getFunctionType(InferenceVisitorBase base);
// Coverage-ignore(suite): Not run.
/// Returns the type parameters declared on this member.
///
/// For instance for
///
/// abstract class Class<T> {
/// T instanceMethod<S>(S s);
/// }
/// extension Extension<T> on Class<T> {
/// T extensionMethod<S>(S s);
/// }
///
/// the type parameters on `Class.instanceMethod` and
/// `Extension.extensionMethod` are `[S]`, despite the lowering of
/// `Extension.extensionMethod` having a clone of `T` from `Extension`.
List<TypeParameter> getTypeParameters() =>
member?.function?.typeParameters ?? const [];
/// Returns the type of this target when accessed as a getter on
/// [receiverType].
///
@@ -1058,30 +1076,44 @@ class NeverAccessTarget extends ObjectAccessTarget {
}
}
class ExtensionAccessTarget extends ObjectAccessTarget {
mixin _ExtensionOrExtensionTypeAccessTargetMixin implements ObjectAccessTarget {
@override
final DartType receiverType;
@override
final Member member;
@override
final Member? tearoffTarget;
@override
final ClassMemberKind declarationMethodKind;
@override
final List<DartType> receiverTypeArguments;
Member get member;
ExtensionAccessTarget(
this.receiverType,
this.member,
this.tearoffTarget,
this.declarationMethodKind,
this.receiverTypeArguments, {
bool isPotentiallyNullable = false,
}) : super.internal(
isPotentiallyNullable
? ObjectAccessTargetKind.nullableExtensionMember
: ObjectAccessTargetKind.extensionMember,
);
@override
List<TypeParameter> getTypeParameters() {
if (receiverTypeArguments.isNotEmpty) {
List<TypeParameter> loweredTypeParameters =
member.function!.typeParameters;
List<TypeParameter> typeParameters = loweredTypeParameters
.skip(receiverTypeArguments.length)
.toList();
if (typeParameters.isEmpty) {
return typeParameters;
}
Substitution substitution = Substitution.fromPairs(
loweredTypeParameters.take(receiverTypeArguments.length).toList(),
receiverTypeArguments,
);
List<TypeParameter> instantiatedTypeParameters = getFreshTypeParameters(
typeParameters,
).freshTypeParameters;
for (int i = 0; i < typeParameters.length; i++) {
TypeParameter typeParameter = instantiatedTypeParameters[i];
typeParameter.bound = substitution.substituteType(typeParameter.bound);
typeParameter.defaultType = substitution.substituteType(
typeParameter.defaultType,
);
// These type parameters are used for error reporting, so inherit
// the location of the original.
typeParameter.fileOffset = typeParameters[i].fileOffset;
typeParameter.declaration = typeParameters[i].declaration;
}
return instantiatedTypeParameters;
} else {
return member.function?.typeParameters.toList() ?? const [];
}
}
@override
InvocationTargetType getFunctionType(InferenceVisitorBase base) {
@@ -1295,7 +1327,6 @@ class ExtensionAccessTarget extends ObjectAccessTarget {
if (functionType.positionalParameters.length > 1) {
DartType keyType = functionType.positionalParameters[1];
if (functionType.typeParameters.isNotEmpty) {
// Coverage-ignore-block(suite): Not run.
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
functionType.typeParameters,
@@ -1312,6 +1343,33 @@ class ExtensionAccessTarget extends ObjectAccessTarget {
return const InvalidType();
}
}
}
class ExtensionAccessTarget extends ObjectAccessTarget
with _ExtensionOrExtensionTypeAccessTargetMixin {
@override
final DartType receiverType;
@override
final Member member;
@override
final Member? tearoffTarget;
@override
final ClassMemberKind declarationMethodKind;
@override
final List<DartType> receiverTypeArguments;
ExtensionAccessTarget(
this.receiverType,
this.member,
this.tearoffTarget,
this.declarationMethodKind,
this.receiverTypeArguments, {
bool isPotentiallyNullable = false,
}) : super.internal(
isPotentiallyNullable
? ObjectAccessTargetKind.nullableExtensionMember
: ObjectAccessTargetKind.extensionMember,
);
@override
String toString() =>
@@ -1537,7 +1595,8 @@ class RecordNameTarget extends RecordAccessTarget {
);
}
class ExtensionTypeAccessTarget extends ObjectAccessTarget {
class ExtensionTypeAccessTarget extends ObjectAccessTarget
with _ExtensionOrExtensionTypeAccessTargetMixin {
@override
final DartType receiverType;
@override
@@ -1565,234 +1624,6 @@ class ExtensionTypeAccessTarget extends ObjectAccessTarget {
: ObjectAccessTargetKind.nullableExtensionTypeMember,
);
@override
InvocationTargetType getFunctionType(InferenceVisitorBase base) {
switch (declarationMethodKind) {
case ClassMemberKind.Method:
FunctionType functionType = member.function!.computeFunctionType(
Nullability.nonNullable,
);
List<StructuralParameter> targetTypeParameters =
const <StructuralParameter>[];
if (functionType.typeParameters.length > receiverTypeArguments.length) {
targetTypeParameters = functionType.typeParameters
.skip(receiverTypeArguments.length)
.toList();
}
FunctionType targetFunctionType = new FunctionType(
functionType.positionalParameters.skip(1).toList(),
functionType.returnType,
Nullability.nonNullable,
requiredParameterCount: functionType.requiredParameterCount - 1,
namedParameters: functionType.namedParameters,
typeParameters: targetTypeParameters,
);
if (receiverTypeArguments.isNotEmpty) {
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
functionType.typeParameters
.take(receiverTypeArguments.length)
.toList(),
receiverTypeArguments,
);
targetFunctionType =
instantiator.substitute(targetFunctionType) as FunctionType;
}
return new InvocationTargetFunctionType(targetFunctionType);
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Getter:
// TODO(johnniwinther): Handle implicit .call on extension getter.
return _getFunctionType(base, member.function!.returnType);
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Setter:
throw unexpected('$this', 'getFunctionType', -1, null);
}
}
@override
DartType getGetterType(InferenceVisitorBase base) {
switch (declarationMethodKind) {
case ClassMemberKind.Method:
FunctionType functionType = member.function!.computeFunctionType(
Nullability.nonNullable,
);
List<StructuralParameter> extensionTypeParameters = functionType
.typeParameters
.take(receiverTypeArguments.length)
.toList();
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
extensionTypeParameters,
receiverTypeArguments,
);
DartType resultType = instantiator.substitute(
new FunctionType(
functionType.positionalParameters.skip(1).toList(),
functionType.returnType,
Nullability.nonNullable,
namedParameters: functionType.namedParameters,
typeParameters: functionType.typeParameters
.skip(receiverTypeArguments.length)
.toList(),
requiredParameterCount: functionType.requiredParameterCount - 1,
),
);
return resultType;
case ClassMemberKind.Getter:
FunctionType functionType = member.function!.computeFunctionType(
Nullability.nonNullable,
);
List<StructuralParameter> extensionTypeParameters = functionType
.typeParameters
.take(receiverTypeArguments.length)
.toList();
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
extensionTypeParameters,
receiverTypeArguments,
);
DartType resultType = instantiator.substitute(functionType.returnType);
return resultType;
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Setter:
throw unexpected('$this', 'getGetterType', -1, null);
}
}
@override
DartType getSetterType(InferenceVisitorBase base) {
switch (declarationMethodKind) {
case ClassMemberKind.Setter:
FunctionType functionType = member.function!.computeFunctionType(
Nullability.nonNullable,
);
List<StructuralParameter> extensionTypeParameters = functionType
.typeParameters
.take(receiverTypeArguments.length)
.toList();
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
extensionTypeParameters,
receiverTypeArguments,
);
DartType setterType = instantiator.substitute(
functionType.positionalParameters[1],
);
return setterType;
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Method:
case ClassMemberKind.Getter:
throw unexpected('$this', 'getSetterType', -1, null);
}
}
@override
DartType getIndexKeyType(InferenceVisitorBase base) {
switch (declarationMethodKind) {
case ClassMemberKind.Method:
FunctionType functionType = member.function!.computeFunctionType(
Nullability.nonNullable,
);
if (functionType.positionalParameters.length >= 2) {
DartType keyType = functionType.positionalParameters[1];
if (functionType.typeParameters.isNotEmpty) {
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
functionType.typeParameters,
receiverTypeArguments,
);
keyType = instantiator.substitute(keyType);
}
return keyType;
}
return const InvalidType();
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Getter:
case ClassMemberKind.Setter:
throw unexpected('$this', 'getIndexKeyType', -1, null);
}
}
@override
DartType getIndexSetValueType(InferenceVisitorBase base) {
switch (declarationMethodKind) {
case ClassMemberKind.Method:
FunctionType functionType = member.function!.computeFunctionType(
Nullability.nonNullable,
);
if (functionType.positionalParameters.length >= 3) {
DartType indexType = functionType.positionalParameters[2];
if (functionType.typeParameters.isNotEmpty) {
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
functionType.typeParameters,
receiverTypeArguments,
);
indexType = instantiator.substitute(indexType);
}
return indexType;
}
return const InvalidType();
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Getter:
case ClassMemberKind.Setter:
throw unexpected('$this', 'getIndexSetValueType', -1, null);
}
}
@override
DartType getReturnType(InferenceVisitorBase base) {
switch (declarationMethodKind) {
case ClassMemberKind.Method:
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Getter:
FunctionType functionType = member.function!.computeFunctionType(
Nullability.nonNullable,
);
DartType returnType = functionType.returnType;
if (functionType.typeParameters.isNotEmpty) {
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
functionType.typeParameters,
receiverTypeArguments,
);
returnType = instantiator.substitute(returnType);
}
return returnType;
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Setter:
return const VoidType();
}
}
@override
DartType getBinaryOperandType(InferenceVisitorBase base) {
switch (declarationMethodKind) {
case ClassMemberKind.Method:
FunctionType functionType = member.function!.computeFunctionType(
Nullability.nonNullable,
);
if (functionType.positionalParameters.length > 1) {
DartType keyType = functionType.positionalParameters[1];
if (functionType.typeParameters.isNotEmpty) {
FunctionTypeInstantiator instantiator =
new FunctionTypeInstantiator.fromIterables(
functionType.typeParameters,
receiverTypeArguments,
);
keyType = instantiator.substitute(keyType);
}
return keyType;
}
return const InvalidType();
// Coverage-ignore(suite): Not run.
case ClassMemberKind.Getter:
case ClassMemberKind.Setter:
return const InvalidType();
}
}
@override
String toString() =>
'ExtensionTypeAccessTarget($kind,$member,$declarationMethodKind,'
@@ -1265,6 +1265,7 @@ void _testExtensionCompoundSet() {
readOffset: -1,
binaryOffset: -1,
writeOffset: -1,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0).foo -= 1''',
@@ -1285,6 +1286,7 @@ Extension(0).foo -= 1''',
readOffset: -1,
binaryOffset: -1,
writeOffset: -1,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?.foo += 1''',
@@ -1305,6 +1307,7 @@ Extension(0)?.foo += 1''',
readOffset: -1,
binaryOffset: -1,
writeOffset: -1,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0).foo += 1''',
@@ -1325,6 +1328,7 @@ Extension<void>(0).foo += 1''',
readOffset: -1,
binaryOffset: -1,
writeOffset: -1,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?.foo -= 1''',
@@ -1769,6 +1773,7 @@ void _testExtensionIndexGet() {
getter,
new IntLiteral(1),
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)[1]''',
@@ -1782,6 +1787,7 @@ Extension(0)[1]''',
getter,
new IntLiteral(1),
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?[1]''',
@@ -1795,6 +1801,7 @@ Extension(0)?[1]''',
getter,
new IntLiteral(1),
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)[1]''',
@@ -1808,6 +1815,7 @@ Extension<void>(0)[1]''',
getter,
new IntLiteral(1),
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?[1]''',
@@ -1840,6 +1848,7 @@ void _testExtensionIndexSet() {
new IntLiteral(2),
isNullAware: false,
forEffect: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)[1] = 2''',
@@ -1855,6 +1864,7 @@ Extension(0)[1] = 2''',
new IntLiteral(2),
isNullAware: true,
forEffect: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?[1] = 2''',
@@ -1870,6 +1880,7 @@ Extension(0)?[1] = 2''',
new IntLiteral(2),
isNullAware: false,
forEffect: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)[1] = 2''',
@@ -1885,6 +1896,7 @@ Extension<void>(0)[1] = 2''',
new IntLiteral(2),
isNullAware: true,
forEffect: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?[1] = 2''',
@@ -2068,6 +2080,7 @@ void _testExtensionCompoundIndexSet() {
binaryOffset: -1,
writeOffset: -1,
forPostIncDec: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)[1] -= 2''',
@@ -2089,6 +2102,7 @@ Extension(0)[1] -= 2''',
binaryOffset: -1,
writeOffset: -1,
forPostIncDec: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?[1] += 2''',
@@ -2110,6 +2124,7 @@ Extension(0)?[1] += 2''',
binaryOffset: -1,
writeOffset: -1,
forPostIncDec: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)[1]--''',
@@ -2131,6 +2146,7 @@ Extension(0)[1]--''',
binaryOffset: -1,
writeOffset: -1,
forPostIncDec: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?[1]++''',
@@ -2152,6 +2168,7 @@ Extension(0)?[1]++''',
binaryOffset: -1,
writeOffset: -1,
forPostIncDec: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)[1] += 2''',
@@ -2173,6 +2190,7 @@ Extension<void>(0)[1] += 2''',
binaryOffset: -1,
writeOffset: -1,
forPostIncDec: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?[1] -= 2''',
@@ -2194,6 +2212,7 @@ Extension<void>(0)?[1] -= 2''',
binaryOffset: -1,
writeOffset: -1,
forPostIncDec: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)[1]++''',
@@ -2215,6 +2234,7 @@ Extension<void>(0)[1]++''',
binaryOffset: -1,
writeOffset: -1,
forPostIncDec: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?[1]--''',
@@ -2246,6 +2266,7 @@ void _testExtensionGet() {
name: name,
getter: getter,
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0).foo''',
@@ -2259,6 +2280,7 @@ Extension(0).foo''',
name: name,
getter: getter,
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?.foo''',
@@ -2272,6 +2294,7 @@ Extension(0)?.foo''',
name: name,
getter: getter,
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0).foo''',
@@ -2285,6 +2308,7 @@ Extension<void>(0).foo''',
name: name,
getter: getter,
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?.foo''',
@@ -2536,6 +2560,7 @@ void _testExtensionPostIncDec() {
isPost: true,
isInc: true,
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0).foo++''',
@@ -2553,6 +2578,7 @@ Extension(0).foo++''',
isPost: true,
isInc: false,
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?.foo--''',
@@ -2570,6 +2596,7 @@ Extension(0)?.foo--''',
isPost: true,
isInc: false,
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0).foo--''',
@@ -2587,6 +2614,7 @@ Extension<void>(0).foo--''',
isPost: true,
isInc: true,
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?.foo++''',
@@ -2625,6 +2653,7 @@ Extension<void>(0)?.foo++''',
isPost: false,
isInc: true,
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
++Extension(0).foo''',
@@ -2642,6 +2671,7 @@ Extension<void>(0)?.foo++''',
isPost: false,
isInc: false,
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
--Extension(0)?.foo''',
@@ -2659,6 +2689,7 @@ Extension<void>(0)?.foo++''',
isPost: false,
isInc: false,
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
--Extension<void>(0).foo''',
@@ -2676,6 +2707,7 @@ Extension<void>(0)?.foo++''',
isPost: false,
isInc: true,
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
++Extension<void>(0)?.foo''',
@@ -2730,6 +2762,7 @@ void _testExtensionSet() {
value: new IntLiteral(1),
isNullAware: false,
forEffect: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0).foo = 1''',
@@ -2745,6 +2778,7 @@ Extension(0).foo = 1''',
value: new IntLiteral(1),
isNullAware: true,
forEffect: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?.foo = 1''',
@@ -2760,6 +2794,7 @@ Extension(0)?.foo = 1''',
value: new IntLiteral(1),
isNullAware: false,
forEffect: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0).foo = 1''',
@@ -2775,6 +2810,7 @@ Extension<void>(0).foo = 1''',
value: new IntLiteral(1),
isNullAware: true,
forEffect: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?.foo = 1''',
@@ -2827,6 +2863,7 @@ void _testExtensionTearOff() {
name: name,
tearOff: tearOff,
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0).foo''',
@@ -2840,6 +2877,7 @@ Extension(0).foo''',
name: name,
tearOff: tearOff,
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension(0)?.foo''',
@@ -2853,6 +2891,7 @@ Extension(0)?.foo''',
name: name,
tearOff: tearOff,
isNullAware: false,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0).foo''',
@@ -2866,6 +2905,7 @@ Extension<void>(0).foo''',
name: name,
tearOff: tearOff,
isNullAware: true,
extensionTypeArgumentOffset: -1,
),
'''
Extension<void>(0)?.foo''',
@@ -49,15 +49,15 @@ test(A a) {
Extension<A>(classA).method; // Error: Expect bounds mismatch.
Extension<A>(classA).property; // Error: Expect bounds mismatch.
Extension<A>(classA).property = null; // Error: Expect bounds mismatch.
Extension<A>(classA).property += null; // TODO: Expect bounds mismatch.
Extension<A>(classA).property += null; // Error: Expect bounds mismatch.
Extension<A>(classA).property ??= 0; // Error: Expect bounds mismatch.
Extension<A>(classA).property(); // TODO: Expect bounds mismatch.
Extension<A>(classA).property(); // Error: Expect bounds mismatch.
Extension<A>(classA).property++; // Error: Expect bounds mismatch.
--Extension<A>(classA).property; // Error: Expect bounds mismatch.
Extension<A>(classA)[0]; // Error: Expect bounds mismatch.
Extension<A>(classA)[0] = null; // Error: Expect bounds mismatch.
Extension<A>(classA)[0] += null; // TODO: Expect bounds mismatch.
Extension<A>(classA)[0] ??= 0; // TODO: Expect bounds mismatch.
Extension<A>(classA)[0] += null; // Error: Expect bounds mismatch.
Extension<A>(classA)[0] ??= 0; // Error: Expect bounds mismatch.
Extension(classA).genericMethod(); // Error: Expect bounds mismatch.
Extension(classA).genericMethod(a); // Error: Expect bounds mismatch.
Extension(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
@@ -16,12 +16,12 @@ library;
// final field2 = Extension(classA).method(); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:127:37: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:127:28: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field3 = Extension<A>(classA).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -53,7 +53,7 @@ library;
// final field6 = Extension(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:130:34: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:130:34: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -76,33 +76,33 @@ library;
// final field7 = Extension(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:28: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:51: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:37: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:134:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -112,29 +112,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:43: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:138:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:140:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:140:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -150,12 +150,12 @@ library;
// final field13 = Extension<B>(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:145:38: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:145:29: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field16 = Extension<A>(classB).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -188,7 +188,7 @@ library;
// final field21 = Extension(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:153:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:153:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -204,33 +204,33 @@ library;
// final field23 = Extension(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:158:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -240,29 +240,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:43: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:162:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:164:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:164:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -439,40 +439,62 @@ library;
// Extension(classA)[0] ??= 0; // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:48:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:48:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:49:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:49:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart: Context: This is the type variable whose bound isn't conformed to.
//
// pkg/front_end/testcases/extensions/check_bounds.dart:50:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:51:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:50:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:51:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property = null; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:52:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property += null; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:53:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property ??= 0; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -491,42 +513,72 @@ library;
// Extension<A>(classA).property ??= 0; // Error: Expect bounds mismatch.
// ^^^^^^^^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:55:32: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:54:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property(); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:55:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property++; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:56:3: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:56:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// --Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:57:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on '[]='.
// pkg/front_end/testcases/extensions/check_bounds.dart:57:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0]; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:58:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on '[]='.
// pkg/front_end/testcases/extensions/check_bounds.dart:58:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] = null; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:59:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] += null; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:60:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] ??= 0; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -551,7 +603,7 @@ library;
// Extension(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:63:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:63:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -574,33 +626,33 @@ library;
// Extension(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:67:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -610,29 +662,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:89:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:90:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:90:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -676,7 +728,7 @@ library;
// Extension(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:111:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:111:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -692,33 +744,33 @@ library;
// Extension(classB).genericMethod<B>(a); // Error: Argument type mismatch
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:114:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -728,29 +780,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:116:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:117:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:117:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -780,12 +832,12 @@ library;
// Extension(classA).method(); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:13:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:13:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method(); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -810,7 +862,7 @@ library;
// Extension(classA).genericMethod<A>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:16:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:16:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -833,33 +885,33 @@ library;
// Extension(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -869,29 +921,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:21:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:22:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:22:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -907,12 +959,12 @@ library;
// Extension<B>(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:27:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:27:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).method(); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -945,7 +997,7 @@ library;
// Extension(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:34:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:34:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -961,33 +1013,33 @@ library;
// Extension(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -997,29 +1049,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:39:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:40:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:40:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -16,12 +16,12 @@ library;
// final field2 = Extension(classA).method(); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:127:37: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:127:28: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field3 = Extension<A>(classA).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -53,7 +53,7 @@ library;
// final field6 = Extension(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:130:34: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:130:34: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -76,33 +76,33 @@ library;
// final field7 = Extension(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:28: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:51: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:37: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:134:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -112,29 +112,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:43: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:138:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:140:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:140:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -150,12 +150,12 @@ library;
// final field13 = Extension<B>(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:145:38: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:145:29: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field16 = Extension<A>(classB).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -188,7 +188,7 @@ library;
// final field21 = Extension(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:153:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:153:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -204,33 +204,33 @@ library;
// final field23 = Extension(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:158:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -240,29 +240,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:43: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:162:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:164:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:164:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -439,40 +439,62 @@ library;
// Extension(classA)[0] ??= 0; // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:48:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:48:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:49:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:49:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart: Context: This is the type variable whose bound isn't conformed to.
//
// pkg/front_end/testcases/extensions/check_bounds.dart:50:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:51:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:50:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:51:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property = null; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:52:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property += null; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:53:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property ??= 0; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -491,42 +513,72 @@ library;
// Extension<A>(classA).property ??= 0; // Error: Expect bounds mismatch.
// ^^^^^^^^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:55:32: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:54:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property(); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:55:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property++; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:56:3: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:56:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// --Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:57:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on '[]='.
// pkg/front_end/testcases/extensions/check_bounds.dart:57:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0]; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:58:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on '[]='.
// pkg/front_end/testcases/extensions/check_bounds.dart:58:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] = null; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:59:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] += null; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:60:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] ??= 0; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -551,7 +603,7 @@ library;
// Extension(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:63:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:63:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -574,33 +626,33 @@ library;
// Extension(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:67:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -610,29 +662,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:89:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:90:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:90:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -676,7 +728,7 @@ library;
// Extension(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:111:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:111:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -692,33 +744,33 @@ library;
// Extension(classB).genericMethod<B>(a); // Error: Argument type mismatch
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:114:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -728,29 +780,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:116:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:117:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:117:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -780,12 +832,12 @@ library;
// Extension(classA).method(); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:13:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:13:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method(); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -810,7 +862,7 @@ library;
// Extension(classA).genericMethod<A>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:16:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:16:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -833,33 +885,33 @@ library;
// Extension(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -869,29 +921,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:21:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:22:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:22:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -907,12 +959,12 @@ library;
// Extension<B>(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:27:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:27:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).method(); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -945,7 +997,7 @@ library;
// Extension(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:34:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:34:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -961,33 +1013,33 @@ library;
// Extension(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -997,29 +1049,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:39:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:40:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:40:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -16,12 +16,12 @@ library;
// final field2 = Extension(classA).method(); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:127:37: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:127:28: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field3 = Extension<A>(classA).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -53,7 +53,7 @@ library;
// final field6 = Extension(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:130:34: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:130:34: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -76,33 +76,33 @@ library;
// final field7 = Extension(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:28: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:51: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:37: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:134:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -112,29 +112,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:43: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:138:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:140:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:140:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -150,12 +150,12 @@ library;
// final field13 = Extension<B>(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:145:38: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:145:29: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field16 = Extension<A>(classB).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -188,7 +188,7 @@ library;
// final field21 = Extension(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:153:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:153:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -204,33 +204,33 @@ library;
// final field23 = Extension(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:158:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -240,29 +240,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:43: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:162:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:164:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:164:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -16,12 +16,12 @@ library;
// final field2 = Extension(classA).method(); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:127:37: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:127:28: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field3 = Extension<A>(classA).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -53,7 +53,7 @@ library;
// final field6 = Extension(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:130:34: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:130:34: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -76,33 +76,33 @@ library;
// final field7 = Extension(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:28: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:51: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:132:37: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field8 = Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:134:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:134:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -112,29 +112,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:43: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:136:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:138:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:140:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:140:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -150,12 +150,12 @@ library;
// final field13 = Extension<B>(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:145:38: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:145:29: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// final field16 = Extension<A>(classB).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -188,7 +188,7 @@ library;
// final field21 = Extension(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:153:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:153:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -204,33 +204,33 @@ library;
// final field23 = Extension(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:156:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:158:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:158:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -240,29 +240,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:43: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:160:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:162:40: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:164:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:164:26: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -439,40 +439,62 @@ library;
// Extension(classA)[0] ??= 0; // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:48:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:48:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method(); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:49:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds.dart:49:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart: Context: This is the type variable whose bound isn't conformed to.
//
// pkg/front_end/testcases/extensions/check_bounds.dart:50:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:51:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:50:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:51:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property = null; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:52:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property += null; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:53:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property ??= 0; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -491,42 +513,72 @@ library;
// Extension<A>(classA).property ??= 0; // Error: Expect bounds mismatch.
// ^^^^^^^^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:55:32: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:54:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property(); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:55:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).property++; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:56:3: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'property'.
// pkg/front_end/testcases/extensions/check_bounds.dart:56:17: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// --Extension<A>(classA).property; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:57:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on '[]='.
// pkg/front_end/testcases/extensions/check_bounds.dart:57:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0]; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:58:23: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on '[]='.
// pkg/front_end/testcases/extensions/check_bounds.dart:58:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] = null; // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:59:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] += null; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:60:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA)[0] ??= 0; // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -551,7 +603,7 @@ library;
// Extension(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:63:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:63:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -574,33 +626,33 @@ library;
// Extension(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:66:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:67:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:67:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -610,29 +662,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:68:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:89:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:90:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:90:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -676,7 +728,7 @@ library;
// Extension(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:111:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:111:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -692,33 +744,33 @@ library;
// Extension(classB).genericMethod<B>(a); // Error: Argument type mismatch
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:113:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:114:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Error: Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:114:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -728,29 +780,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:115:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Error: Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:116:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Error: Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds.dart:117:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds.dart:117:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -780,12 +832,12 @@ library;
// Extension(classA).method(); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:13:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:13:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).method(); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -810,7 +862,7 @@ library;
// Extension(classA).genericMethod<A>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:16:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:16:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -833,33 +885,33 @@ library;
// Extension(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:18:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<A>(a); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:19:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -869,29 +921,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:20:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classA).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:21:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:22:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:22:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -907,12 +959,12 @@ library;
// Extension<B>(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:27:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'method'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:27:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).method(); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
@@ -945,7 +997,7 @@ library;
// Extension(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:34:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:34:21: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -961,33 +1013,33 @@ library;
// Extension(classB).genericMethod<B>(a);
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:36:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<A>(a); // Expect bounds mismatch.
// ^
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:37:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -997,29 +1049,29 @@ library;
// genericMethod<S extends B>(S s) {}
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:15: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'Extension'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:41: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:38:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'T' on 'genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
// Extension<A>(classB).genericMethod<B>(a); // Expect bounds mismatch.
// ^
// pkg/front_end/testcases/extensions/check_bounds.dart:13:21: Context: This is the type variable whose bound isn't conformed to.
// extension Extension<T extends B> on Class<T> {
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:39:38: Error: The argument type 'A' can't be assigned to the parameter type 'B'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Extension<B>(classB).genericMethod(a); // Expect bounds mismatch.
// ^
//
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:40:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'genericMethod'.
// pkg/front_end/testcases/extensions/check_bounds_lib.dart:40:24: Error: Type argument 'A' doesn't conform to the bound 'B' of the type variable 'S' on 'Extension.genericMethod'.
// - 'A' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// - 'B' is from 'pkg/front_end/testcases/extensions/check_bounds.dart'.
// Try changing type arguments so that they conform to the bounds.
@@ -41,8 +41,8 @@ void main() {
E1<String>(s).e1;
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
// ^
// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'e1'.
// ^
// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'E1'.
// Inferred types of int and double are ok
i.e1;
@@ -61,12 +61,12 @@ void main() {
// [error column 3, length 2]
// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
// ^
// [cfe] Inferred type argument 'String' doesn't conform to the bound 'S' of the type variable 'T' on 'e2'.
// [cfe] Inferred type argument 'String' doesn't conform to the bound 'S' of the type variable 'T' on 'E2'.
E2<String, num>(s).e2;
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
// ^
// [cfe] Type argument 'String' doesn't conform to the bound 'S' of the type variable 'T' on 'e2'.
// ^
// [cfe] Type argument 'String' doesn't conform to the bound 'S' of the type variable 'T' on 'E2'.
// Inferred types of int and double are ok
i.e2;
@@ -128,10 +128,10 @@ void main() {
// [error column 3, length 2]
// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
// ^
// [cfe] Inferred type argument 'Rec<dynamic>' doesn't conform to the bound 'Rec<T>' of the type variable 'T' on 'e4'.
// [cfe] Inferred type argument 'Rec<dynamic>' doesn't conform to the bound 'Rec<T>' of the type variable 'T' on 'E4'.
E4<Rec<dynamic>>(superRec).e4;
// ^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
// ^
// [cfe] Type argument 'Rec<dynamic>' doesn't conform to the bound 'Rec<T>' of the type variable 'T' on 'e4'.
// ^
// [cfe] Type argument 'Rec<dynamic>' doesn't conform to the bound 'Rec<T>' of the type variable 'T' on 'E4'.
}
@@ -18,7 +18,7 @@ void test1() {
g.m<F<Iterable<int?> Function()>>;
g.m<F<Iterable<int> Function()>>();
//^
// [cfe] Type argument 'Iterable<int> Function() Function(Iterable<int> Function())' doesn't conform to the bound 'X Function(X)' of the type variable 'Y' on 'm'.
// [cfe] Type argument 'Iterable<int> Function() Function(Iterable<int> Function())' doesn't conform to the bound 'Iterable<int?> Function() Function(Iterable<int?> Function())' of the type variable 'Y' on 'm'.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
g.m<F<Iterable<int> Function()>>;
@@ -33,7 +33,7 @@ void test2(Iterable<int?> h()) {
h.m<F<Iterable<int?> Function()>>;
h.m<F<Iterable<int> Function()>>();
//^
// [cfe] Type argument 'Iterable<int> Function() Function(Iterable<int> Function())' doesn't conform to the bound 'X Function(X)' of the type variable 'Y' on 'm'.
// [cfe] Type argument 'Iterable<int> Function() Function(Iterable<int> Function())' doesn't conform to the bound 'Iterable<int?> Function() Function(Iterable<int?> Function())' of the type variable 'Y' on 'm'.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
h.m<F<Iterable<int> Function()>>;
@@ -18,7 +18,7 @@ void test1() {
g.m<F<int? Function()>>;
g.m<F<int Function()>>();
//^
// [cfe] Type argument 'int Function() Function(int Function())' doesn't conform to the bound 'X Function(X)' of the type variable 'Y' on 'm'.
// [cfe] Type argument 'int Function() Function(int Function())' doesn't conform to the bound 'int? Function() Function(int? Function())' of the type variable 'Y' on 'm'.
// ^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
g.m<F<int Function()>>;
@@ -33,7 +33,7 @@ void test2(int? h()) {
h.m<F<int? Function()>>;
h.m<F<int Function()>>();
//^
// [cfe] Type argument 'int Function() Function(int Function())' doesn't conform to the bound 'X Function(X)' of the type variable 'Y' on 'm'.
// [cfe] Type argument 'int Function() Function(int Function())' doesn't conform to the bound 'int? Function() Function(int? Function())' of the type variable 'Y' on 'm'.
// ^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
h.m<F<int Function()>>;