mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 01:14:16 +00:00
Re-formulation of type bound violation error messages
Change-Id: I7f0b99c184b02f6910da054b877b5b5bee86f6bc Reviewed-on: https://dart-review.googlesource.com/c/85346 Commit-Queue: Aske Simon Christensen <askesc@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This commit is contained in:
parent
03a1fe30f5
commit
c9aaa7a654
|
@ -4146,203 +4146,282 @@ Message _withArgumentsImportHidesImport(String name, Uri uri_, Uri uri2_) {
|
|||
const Template<
|
||||
Message Function(
|
||||
DartType _type,
|
||||
DartType _type2,
|
||||
String name,
|
||||
String
|
||||
name)> templateIncorrectTypeArgument = const Template<
|
||||
Message Function(DartType _type, String name)>(
|
||||
name2)> templateIncorrectTypeArgument = const Template<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>(
|
||||
messageTemplate:
|
||||
r"""Type argument '#type' violates the corresponding type variable bound of '#name'.""",
|
||||
r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'.""",
|
||||
tipTemplate:
|
||||
r"""Try changing type arguments so that they conform to the bounds.""",
|
||||
withArguments: _withArgumentsIncorrectTypeArgument);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Message Function(DartType _type, String name)>
|
||||
codeIncorrectTypeArgument =
|
||||
const Code<Message Function(DartType _type, String name)>(
|
||||
const Code<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>
|
||||
codeIncorrectTypeArgument = const Code<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>(
|
||||
"IncorrectTypeArgument", templateIncorrectTypeArgument,
|
||||
analyzerCodes: <String>["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"]);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsIncorrectTypeArgument(DartType _type, String name) {
|
||||
Message _withArgumentsIncorrectTypeArgument(
|
||||
DartType _type, DartType _type2, String name, String name2) {
|
||||
TypeLabeler labeler = new TypeLabeler();
|
||||
List<Object> typeParts = labeler.labelType(_type);
|
||||
List<Object> type2Parts = labeler.labelType(_type2);
|
||||
if (name.isEmpty) throw 'No name provided';
|
||||
name = demangleMixinApplicationName(name);
|
||||
if (name2.isEmpty) throw 'No name provided';
|
||||
name2 = demangleMixinApplicationName(name2);
|
||||
String type = typeParts.join();
|
||||
String type2 = type2Parts.join();
|
||||
return new Message(codeIncorrectTypeArgument,
|
||||
message:
|
||||
"""Type argument '${type}' violates the corresponding type variable bound of '${name}'.""" +
|
||||
"""Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}'.""" +
|
||||
labeler.originMessages,
|
||||
tip: """Try changing type arguments so that they conform to the bounds.""",
|
||||
arguments: {'type': _type, 'name': name});
|
||||
arguments: {
|
||||
'type': _type,
|
||||
'type2': _type2,
|
||||
'name': name,
|
||||
'name2': name2
|
||||
});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<
|
||||
Message Function(
|
||||
DartType _type,
|
||||
DartType _type2,
|
||||
String name,
|
||||
String
|
||||
name)> templateIncorrectTypeArgumentInReturnType = const Template<
|
||||
Message Function(DartType _type, String name)>(
|
||||
name2)> templateIncorrectTypeArgumentInReturnType = const Template<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>(
|
||||
messageTemplate:
|
||||
r"""Type argument '#type' violates the corresponding type variable bound of '#name' in the return type.""",
|
||||
r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the return type.""",
|
||||
tipTemplate:
|
||||
r"""Try changing type arguments so that they conform to the bounds.""",
|
||||
withArguments: _withArgumentsIncorrectTypeArgumentInReturnType);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Message Function(DartType _type, String name)>
|
||||
codeIncorrectTypeArgumentInReturnType =
|
||||
const Code<Message Function(DartType _type, String name)>(
|
||||
const Code<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>
|
||||
codeIncorrectTypeArgumentInReturnType = const Code<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>(
|
||||
"IncorrectTypeArgumentInReturnType",
|
||||
templateIncorrectTypeArgumentInReturnType,
|
||||
analyzerCodes: <String>["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"]);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsIncorrectTypeArgumentInReturnType(
|
||||
DartType _type, String name) {
|
||||
DartType _type, DartType _type2, String name, String name2) {
|
||||
TypeLabeler labeler = new TypeLabeler();
|
||||
List<Object> typeParts = labeler.labelType(_type);
|
||||
List<Object> type2Parts = labeler.labelType(_type2);
|
||||
if (name.isEmpty) throw 'No name provided';
|
||||
name = demangleMixinApplicationName(name);
|
||||
if (name2.isEmpty) throw 'No name provided';
|
||||
name2 = demangleMixinApplicationName(name2);
|
||||
String type = typeParts.join();
|
||||
String type2 = type2Parts.join();
|
||||
return new Message(codeIncorrectTypeArgumentInReturnType,
|
||||
message:
|
||||
"""Type argument '${type}' violates the corresponding type variable bound of '${name}' in the return type.""" +
|
||||
"""Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the return type.""" +
|
||||
labeler.originMessages,
|
||||
tip: """Try changing type arguments so that they conform to the bounds.""",
|
||||
arguments: {'type': _type, 'name': name});
|
||||
arguments: {
|
||||
'type': _type,
|
||||
'type2': _type2,
|
||||
'name': name,
|
||||
'name2': name2
|
||||
});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<
|
||||
Message Function(
|
||||
DartType _type,
|
||||
DartType _type2,
|
||||
String name,
|
||||
String name2,
|
||||
String name3,
|
||||
String
|
||||
name3)> templateIncorrectTypeArgumentInSupertype = const Template<
|
||||
Message Function(
|
||||
DartType _type, String name, String name2, String name3)>(
|
||||
name4)> templateIncorrectTypeArgumentInSupertype = const Template<
|
||||
Message Function(DartType _type, DartType _type2, String name,
|
||||
String name2, String name3, String name4)>(
|
||||
messageTemplate:
|
||||
r"""Type argument '#type' violates the corresponding type variable bound of '#name' in the supertype '#name2' of class '#name3'.""",
|
||||
r"""Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'.""",
|
||||
tipTemplate:
|
||||
r"""Try changing type arguments so that they conform to the bounds.""",
|
||||
withArguments: _withArgumentsIncorrectTypeArgumentInSupertype);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<
|
||||
Message Function(
|
||||
DartType _type, String name, String name2, String name3)>
|
||||
Message Function(DartType _type, DartType _type2, String name,
|
||||
String name2, String name3, String name4)>
|
||||
codeIncorrectTypeArgumentInSupertype = const Code<
|
||||
Message Function(
|
||||
DartType _type, String name, String name2, String name3)>(
|
||||
Message Function(DartType _type, DartType _type2, String name,
|
||||
String name2, String name3, String name4)>(
|
||||
"IncorrectTypeArgumentInSupertype",
|
||||
templateIncorrectTypeArgumentInSupertype,
|
||||
analyzerCodes: <String>["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"]);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsIncorrectTypeArgumentInSupertype(
|
||||
DartType _type, String name, String name2, String name3) {
|
||||
Message _withArgumentsIncorrectTypeArgumentInSupertype(DartType _type,
|
||||
DartType _type2, String name, String name2, String name3, String name4) {
|
||||
TypeLabeler labeler = new TypeLabeler();
|
||||
List<Object> typeParts = labeler.labelType(_type);
|
||||
List<Object> type2Parts = labeler.labelType(_type2);
|
||||
if (name.isEmpty) throw 'No name provided';
|
||||
name = demangleMixinApplicationName(name);
|
||||
if (name2.isEmpty) throw 'No name provided';
|
||||
name2 = demangleMixinApplicationName(name2);
|
||||
if (name3.isEmpty) throw 'No name provided';
|
||||
name3 = demangleMixinApplicationName(name3);
|
||||
if (name4.isEmpty) throw 'No name provided';
|
||||
name4 = demangleMixinApplicationName(name4);
|
||||
String type = typeParts.join();
|
||||
String type2 = type2Parts.join();
|
||||
return new Message(codeIncorrectTypeArgumentInSupertype,
|
||||
message:
|
||||
"""Type argument '${type}' violates the corresponding type variable bound of '${name}' in the supertype '${name2}' of class '${name3}'.""" +
|
||||
"""Type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the supertype '${name3}' of class '${name4}'.""" +
|
||||
labeler.originMessages,
|
||||
tip: """Try changing type arguments so that they conform to the bounds.""",
|
||||
arguments: {'type': _type, 'name': name, 'name2': name2, 'name3': name3});
|
||||
tip:
|
||||
"""Try changing type arguments so that they conform to the bounds.""",
|
||||
arguments: {
|
||||
'type': _type,
|
||||
'type2': _type2,
|
||||
'name': name,
|
||||
'name2': name2,
|
||||
'name3': name3,
|
||||
'name4': name4
|
||||
});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<
|
||||
Message Function(
|
||||
DartType _type,
|
||||
DartType _type2,
|
||||
String name,
|
||||
String name2,
|
||||
String name3,
|
||||
String
|
||||
name3)> templateIncorrectTypeArgumentInSupertypeInferred = const Template<
|
||||
Message Function(DartType _type, String name, String name2,
|
||||
String name3)>(
|
||||
name4)> templateIncorrectTypeArgumentInSupertypeInferred = const Template<
|
||||
Message Function(
|
||||
DartType _type,
|
||||
DartType _type2,
|
||||
String name,
|
||||
String name2,
|
||||
String name3,
|
||||
String
|
||||
name4)>(
|
||||
messageTemplate:
|
||||
r"""Inferred type argument '#type' violates the corresponding type variable bound of '#name' in the supertype '#name2' of class '#name3'.""",
|
||||
r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'.""",
|
||||
tipTemplate:
|
||||
r"""Try specifying type arguments explicitly so that they conform to the bounds.""",
|
||||
withArguments: _withArgumentsIncorrectTypeArgumentInSupertypeInferred);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<
|
||||
Message Function(
|
||||
DartType _type, String name, String name2, String name3)>
|
||||
Message Function(DartType _type, DartType _type2, String name,
|
||||
String name2, String name3, String name4)>
|
||||
codeIncorrectTypeArgumentInSupertypeInferred = const Code<
|
||||
Message Function(
|
||||
DartType _type, String name, String name2, String name3)>(
|
||||
Message Function(DartType _type, DartType _type2, String name,
|
||||
String name2, String name3, String name4)>(
|
||||
"IncorrectTypeArgumentInSupertypeInferred",
|
||||
templateIncorrectTypeArgumentInSupertypeInferred,
|
||||
analyzerCodes: <String>["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"]);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsIncorrectTypeArgumentInSupertypeInferred(
|
||||
DartType _type, String name, String name2, String name3) {
|
||||
Message _withArgumentsIncorrectTypeArgumentInSupertypeInferred(DartType _type,
|
||||
DartType _type2, String name, String name2, String name3, String name4) {
|
||||
TypeLabeler labeler = new TypeLabeler();
|
||||
List<Object> typeParts = labeler.labelType(_type);
|
||||
List<Object> type2Parts = labeler.labelType(_type2);
|
||||
if (name.isEmpty) throw 'No name provided';
|
||||
name = demangleMixinApplicationName(name);
|
||||
if (name2.isEmpty) throw 'No name provided';
|
||||
name2 = demangleMixinApplicationName(name2);
|
||||
if (name3.isEmpty) throw 'No name provided';
|
||||
name3 = demangleMixinApplicationName(name3);
|
||||
if (name4.isEmpty) throw 'No name provided';
|
||||
name4 = demangleMixinApplicationName(name4);
|
||||
String type = typeParts.join();
|
||||
String type2 = type2Parts.join();
|
||||
return new Message(codeIncorrectTypeArgumentInSupertypeInferred,
|
||||
message:
|
||||
"""Inferred type argument '${type}' violates the corresponding type variable bound of '${name}' in the supertype '${name2}' of class '${name3}'.""" +
|
||||
"""Inferred type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}' in the supertype '${name3}' of class '${name4}'.""" +
|
||||
labeler.originMessages,
|
||||
tip: """Try specifying type arguments explicitly so that they conform to the bounds.""",
|
||||
arguments: {'type': _type, 'name': name, 'name2': name2, 'name3': name3});
|
||||
tip:
|
||||
"""Try specifying type arguments explicitly so that they conform to the bounds.""",
|
||||
arguments: {
|
||||
'type': _type,
|
||||
'type2': _type2,
|
||||
'name': name,
|
||||
'name2': name2,
|
||||
'name3': name3,
|
||||
'name4': name4
|
||||
});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<
|
||||
Message Function(
|
||||
DartType _type,
|
||||
DartType _type2,
|
||||
String name,
|
||||
String
|
||||
name)> templateIncorrectTypeArgumentInferred = const Template<
|
||||
Message Function(DartType _type,
|
||||
String name)>(
|
||||
name2)> templateIncorrectTypeArgumentInferred = const Template<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>(
|
||||
messageTemplate:
|
||||
r"""Inferred type argument '#type' violates the corresponding type variable bound of '#name'.""",
|
||||
r"""Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'.""",
|
||||
tipTemplate:
|
||||
r"""Try specifying type arguments explicitly so that they conform to the bounds.""",
|
||||
withArguments: _withArgumentsIncorrectTypeArgumentInferred);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Message Function(DartType _type, String name)>
|
||||
codeIncorrectTypeArgumentInferred =
|
||||
const Code<Message Function(DartType _type, String name)>(
|
||||
const Code<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>
|
||||
codeIncorrectTypeArgumentInferred = const Code<
|
||||
Message Function(
|
||||
DartType _type, DartType _type2, String name, String name2)>(
|
||||
"IncorrectTypeArgumentInferred", templateIncorrectTypeArgumentInferred,
|
||||
analyzerCodes: <String>["TYPE_ARGUMENT_NOT_MATCHING_BOUNDS"]);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
Message _withArgumentsIncorrectTypeArgumentInferred(
|
||||
DartType _type, String name) {
|
||||
DartType _type, DartType _type2, String name, String name2) {
|
||||
TypeLabeler labeler = new TypeLabeler();
|
||||
List<Object> typeParts = labeler.labelType(_type);
|
||||
List<Object> type2Parts = labeler.labelType(_type2);
|
||||
if (name.isEmpty) throw 'No name provided';
|
||||
name = demangleMixinApplicationName(name);
|
||||
if (name2.isEmpty) throw 'No name provided';
|
||||
name2 = demangleMixinApplicationName(name2);
|
||||
String type = typeParts.join();
|
||||
String type2 = type2Parts.join();
|
||||
return new Message(codeIncorrectTypeArgumentInferred,
|
||||
message:
|
||||
"""Inferred type argument '${type}' violates the corresponding type variable bound of '${name}'.""" +
|
||||
"""Inferred type argument '${type}' doesn't conform to the bound '${type2}' of the type variable '${name}' on '${name2}'.""" +
|
||||
labeler.originMessages,
|
||||
tip: """Try specifying type arguments explicitly so that they conform to the bounds.""",
|
||||
arguments: {'type': _type, 'name': name});
|
||||
arguments: {
|
||||
'type': _type,
|
||||
'type2': _type2,
|
||||
'name': name,
|
||||
'name2': name2
|
||||
});
|
||||
}
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
|
@ -4353,7 +4432,7 @@ const Code<Null> codeIncorrectTypeArgumentVariable =
|
|||
const MessageCode messageIncorrectTypeArgumentVariable = const MessageCode(
|
||||
"IncorrectTypeArgumentVariable",
|
||||
severity: Severity.context,
|
||||
message: r"""Bound of this variable is violated.""");
|
||||
message: r"""This is the type variable whose bound isn't conformed to.""");
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<Message Function(Uri uri_)> templateInferredPackageUri =
|
||||
|
|
|
@ -314,12 +314,16 @@ abstract class KernelClassBuilder
|
|||
message =
|
||||
templateIncorrectTypeArgumentInSupertypeInferred.withArguments(
|
||||
argument,
|
||||
typeParameter.bound,
|
||||
typeParameter.name,
|
||||
getGenericTypeName(issue.enclosingType),
|
||||
supertype.classNode.name,
|
||||
name);
|
||||
} else {
|
||||
message = templateIncorrectTypeArgumentInSupertype.withArguments(
|
||||
argument,
|
||||
typeParameter.bound,
|
||||
typeParameter.name,
|
||||
getGenericTypeName(issue.enclosingType),
|
||||
supertype.classNode.name,
|
||||
name);
|
||||
|
@ -358,7 +362,10 @@ abstract class KernelClassBuilder
|
|||
typeParameter = null;
|
||||
} else {
|
||||
message = templateIncorrectTypeArgument.withArguments(
|
||||
argument, getGenericTypeName(issue.enclosingType));
|
||||
argument,
|
||||
typeParameter.bound,
|
||||
typeParameter.name,
|
||||
getGenericTypeName(issue.enclosingType));
|
||||
}
|
||||
|
||||
library.reportTypeArgumentIssue(
|
||||
|
|
|
@ -1395,10 +1395,10 @@ class KernelLibraryBuilder
|
|||
assert(enclosingName != null);
|
||||
if (issueInferred) {
|
||||
message = templateIncorrectTypeArgumentInferred.withArguments(
|
||||
argument, enclosingName);
|
||||
argument, typeParameter.bound, typeParameter.name, enclosingName);
|
||||
} else {
|
||||
message = templateIncorrectTypeArgument.withArguments(
|
||||
argument, enclosingName);
|
||||
argument, typeParameter.bound, typeParameter.name, enclosingName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1471,7 +1471,10 @@ class KernelLibraryBuilder
|
|||
typeParameter = null;
|
||||
} else {
|
||||
message = templateIncorrectTypeArgumentInReturnType.withArguments(
|
||||
argument, getGenericTypeName(issue.enclosingType));
|
||||
argument,
|
||||
typeParameter.bound,
|
||||
typeParameter.name,
|
||||
getGenericTypeName(issue.enclosingType));
|
||||
}
|
||||
|
||||
reportTypeArgumentIssue(message, offset, typeParameter);
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
# `#unicode` a Unicode short identifier (U+xxxx). We use this to represent code
|
||||
# units or code points.
|
||||
#
|
||||
# `#name`, `#name2`, `#name3`: names (as strings).
|
||||
# `#name`, `#name2`, `#name3`, `#name4`: names (as strings).
|
||||
#
|
||||
# `#lexeme` a token. The token's `lexeme` property is used.
|
||||
#
|
||||
|
@ -3223,7 +3223,7 @@ SyntheticToken:
|
|||
frontendInternal: true
|
||||
|
||||
IncorrectTypeArgument:
|
||||
template: "Type argument '#type' violates the corresponding type variable bound of '#name'."
|
||||
template: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'."
|
||||
tip: "Try changing type arguments so that they conform to the bounds."
|
||||
analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
|
||||
script: >
|
||||
|
@ -3231,7 +3231,7 @@ IncorrectTypeArgument:
|
|||
main() { new C<String>(); }
|
||||
|
||||
IncorrectTypeArgumentInSupertype:
|
||||
template: "Type argument '#type' violates the corresponding type variable bound of '#name' in the supertype '#name2' of class '#name3'."
|
||||
template: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'."
|
||||
tip: "Try changing type arguments so that they conform to the bounds."
|
||||
analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
|
||||
script: >
|
||||
|
@ -3239,7 +3239,7 @@ IncorrectTypeArgumentInSupertype:
|
|||
class B extends A<String> {}
|
||||
|
||||
IncorrectTypeArgumentInReturnType:
|
||||
template: "Type argument '#type' violates the corresponding type variable bound of '#name' in the return type."
|
||||
template: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the return type."
|
||||
tip: "Try changing type arguments so that they conform to the bounds."
|
||||
analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
|
||||
script: >
|
||||
|
@ -3247,7 +3247,7 @@ IncorrectTypeArgumentInReturnType:
|
|||
A<String> foo() => null;
|
||||
|
||||
IncorrectTypeArgumentInferred:
|
||||
template: "Inferred type argument '#type' violates the corresponding type variable bound of '#name'."
|
||||
template: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'."
|
||||
tip: "Try specifying type arguments explicitly so that they conform to the bounds."
|
||||
analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
|
||||
script: >
|
||||
|
@ -3255,7 +3255,7 @@ IncorrectTypeArgumentInferred:
|
|||
main() { foo("bar"); }
|
||||
|
||||
IncorrectTypeArgumentInSupertypeInferred:
|
||||
template: "Inferred type argument '#type' violates the corresponding type variable bound of '#name' in the supertype '#name2' of class '#name3'."
|
||||
template: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'."
|
||||
tip: "Try specifying type arguments explicitly so that they conform to the bounds."
|
||||
analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
|
||||
script: >
|
||||
|
@ -3263,7 +3263,7 @@ IncorrectTypeArgumentInSupertypeInferred:
|
|||
class B extends A {}
|
||||
|
||||
IncorrectTypeArgumentVariable:
|
||||
template: "Bound of this variable is violated."
|
||||
template: "This is the type variable whose bound isn't conformed to."
|
||||
severity: CONTEXT
|
||||
|
||||
InferredPackageUri:
|
||||
|
|
|
@ -24,71 +24,71 @@
|
|||
// class Ef1<X extends Function({int})> {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Bm2<Z> extends Object with Am2<Function(int), Z> {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Am2<X extends Function(), Y> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Cm2<Z> extends Object with Am2<Function(int x), Z> {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Am2<X extends Function(), Y> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:86:7: Error: Type argument 'Function' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:86:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Jm2<Z> extends Object with Am2<Function, Z> {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Am2<X extends Function(), Y> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Km2<Z> extends Object with Am2<Function(Function Function), Z> {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Am2<X extends Function(), Y> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Mm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Mm2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Mm2<Z> = Object with Am2<Function(int), Z>;
|
||||
// ^
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Am2<X extends Function(), Y> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Nm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Nm2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Nm2<Z> = Object with Am2<Function(int x), Z>;
|
||||
// ^
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Am2<X extends Function(), Y> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:114:7: Error: Type argument 'Function' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Um2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:114:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Um2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Um2<Z> = Object with Am2<Function, Z>;
|
||||
// ^
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Am2<X extends Function(), Y> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Vm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Vm2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Vm2<Z> = Object with Am2<Function(Function Function), Z>;
|
||||
// ^
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:64:11: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Am2<X extends Function(), Y> {}
|
||||
// ^
|
||||
|
||||
|
@ -118,45 +118,45 @@
|
|||
// class Ef1<X extends Function({int})> {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Bm2<Z> extends Object with Am2<Function(int), Z> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Cm2<Z> extends Object with Am2<Function(int x), Z> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:86:7: Error: Type argument 'Function' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:86:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Jm2<Z> extends Object with Am2<Function, Z> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Km2<Z> extends Object with Am2<Function(Function Function), Z> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Mm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Mm2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Mm2<Z> = Object with Am2<Function(int), Z>;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Nm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Nm2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Nm2<Z> = Object with Am2<Function(int x), Z>;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:114:7: Error: Type argument 'Function' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Um2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:114:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Um2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Um2<Z> = Object with Am2<Function, Z>;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Vm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Vm2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Vm2<Z> = Object with Am2<Function(Function Function), Z>;
|
||||
|
|
|
@ -24,45 +24,45 @@
|
|||
// class Ef1<X extends Function({int})> {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:67:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Bm2<Z> extends Object with Am2<Function(int), Z> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:70:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Cm2<Z> extends Object with Am2<Function(int x), Z> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:86:7: Error: Type argument 'Function' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:86:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Jm2<Z> extends Object with Am2<Function, Z> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:89:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Object with Am2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Km2<Z> extends Object with Am2<Function(Function Function), Z> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Mm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:95:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Mm2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Mm2<Z> = Object with Am2<Function(int), Z>;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Nm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:98:7: Error: Type argument 'dynamic Function(int)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Nm2'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Nm2<Z> = Object with Am2<Function(int x), Z>;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:114:7: Error: Type argument 'Function' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Um2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:114:7: Error: Type argument 'Function' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Um2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Um2<Z> = Object with Am2<Function, Z>;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' violates the corresponding type variable bound of 'Am2' in the supertype 'Am2' of class 'Vm2'.
|
||||
// pkg/front_end/testcases/clone_function_type.dart:117:7: Error: Type argument 'dynamic Function(Function)' doesn't conform to the bound 'dynamic Function()' of the type variable 'X' on 'Am2' in the supertype 'Am2' of class 'Vm2'.
|
||||
// - 'Function' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Vm2<Z> = Object with Am2<Function(Function Function), Z>;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
Errors: {
|
||||
org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' violates the corresponding type variable bound of 'hasBound'.
|
||||
org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' doesn't conform to the bound 'Bound' of the type variable 'T' on 'hasBound'.
|
||||
- 'Bound' is from 'pkg/front_end/testcases/expression/main.dart'.
|
||||
Try changing type arguments so that they conform to the bounds.
|
||||
hasBound<T>()
|
||||
^
|
||||
pkg/front_end/testcases/expression/main.dart:36:15: Context: Bound of this variable is violated.
|
||||
pkg/front_end/testcases/expression/main.dart:36:15: Context: This is the type variable whose bound isn't conformed to.
|
||||
void hasBound<T extends Bound>() {}
|
||||
^
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
Errors: {
|
||||
org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' violates the corresponding type variable bound of 'hasBound'.
|
||||
org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' doesn't conform to the bound 'Bound' of the type variable 'T' on 'hasBound'.
|
||||
- 'Bound' is from 'pkg/front_end/testcases/expression/main.dart'.
|
||||
Try changing type arguments so that they conform to the bounds.
|
||||
hasBound<T>()
|
||||
^
|
||||
pkg/front_end/testcases/expression/main.dart:36:15: Context: Bound of this variable is violated.
|
||||
pkg/front_end/testcases/expression/main.dart:36:15: Context: This is the type variable whose bound isn't conformed to.
|
||||
void hasBound<T extends Bound>() {}
|
||||
^
|
||||
}
|
||||
|
|
|
@ -1,33 +1,37 @@
|
|||
// Formatted problems:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:22:56: Error: Inferred type argument 'NotA' violates the corresponding type variable bound of 'C'.
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:22:56: Error: Inferred type argument 'NotA' doesn't conform to the bound 'A' of the type variable 'T' on 'C'.
|
||||
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
|
||||
// - 'A' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// new /*error:COULD_NOT_INFER*/ /*@typeArgs=NotA*/ C(myF);
|
||||
// ^
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:12:9: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:12:9: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class C<T extends A> {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:25: Error: Inferred type argument 'NotA' violates the corresponding type variable bound of 'C'.
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:25: Error: Inferred type argument 'NotA' doesn't conform to the bound 'A' of the type variable 'T' on 'C'.
|
||||
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
|
||||
// - 'A' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// var /*@type=C<NotA>*/ x =
|
||||
// ^
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:12:9: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:12:9: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class C<T extends A> {
|
||||
// ^
|
||||
|
||||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:22:56: Error: Inferred type argument 'NotA' violates the corresponding type variable bound of 'C'.
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:22:56: Error: Inferred type argument 'NotA' doesn't conform to the bound 'A' of the type variable 'T' on 'C'.
|
||||
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
|
||||
// - 'A' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// new /*error:COULD_NOT_INFER*/ /*@typeArgs=NotA*/ C(myF);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:25: Error: Inferred type argument 'NotA' violates the corresponding type variable bound of 'C'.
|
||||
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:25: Error: Inferred type argument 'NotA' doesn't conform to the bound 'A' of the type variable 'T' on 'C'.
|
||||
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
|
||||
// - 'A' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// var /*@type=C<NotA>*/ x =
|
||||
// ^
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
// Formatted problems:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' violates the corresponding type variable bound of 'Pair'.
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' doesn't conform to the bound 'Clonable<T>' of the type variable 'T' on 'Pair'.
|
||||
// - 'Clonable' is from 'pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair
|
||||
// ^
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:10:12: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:10:12: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Pair<T extends Clonable<T>, U extends Clonable<U>> {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' violates the corresponding type variable bound of 'Pair'.
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' doesn't conform to the bound 'Clonable<U>' of the type variable 'U' on 'Pair'.
|
||||
// - 'Clonable' is from 'pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair
|
||||
// ^
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:10:35: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:10:35: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class Pair<T extends Clonable<T>, U extends Clonable<U>> {
|
||||
// ^
|
||||
|
||||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' violates the corresponding type variable bound of 'Pair'.
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' doesn't conform to the bound 'Clonable<T>' of the type variable 'T' on 'Pair'.
|
||||
// - 'Clonable' is from 'pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' violates the corresponding type variable bound of 'Pair'.
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' doesn't conform to the bound 'Clonable<U>' of the type variable 'U' on 'Pair'.
|
||||
// - 'Clonable' is from 'pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' violates the corresponding type variable bound of 'Pair'.
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' doesn't conform to the bound 'Clonable<T>' of the type variable 'T' on 'Pair'.
|
||||
// - 'Clonable' is from 'pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' violates the corresponding type variable bound of 'Pair'.
|
||||
// pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'Clonable<dynamic>' doesn't conform to the bound 'Clonable<U>' of the type variable 'U' on 'Pair'.
|
||||
// - 'Clonable' is from 'pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
// Formatted problems:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:21:63: Error: Inferred type argument 'dynamic' violates the corresponding type variable bound of 'max'.
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:21:63: Error: Inferred type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'T' on 'max'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// dynamic c = /*error:COULD_NOT_INFER*/ /*@typeArgs=dynamic*/ max(x, y);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:22:77: Error: Inferred type argument 'dynamic' violates the corresponding type variable bound of 'max'.
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:22:77: Error: Inferred type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'T' on 'max'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// var /*@type=dynamic*/ d = /*error:COULD_NOT_INFER*/ /*@typeArgs=dynamic*/ max(
|
||||
// ^
|
||||
|
||||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:21:63: Error: Inferred type argument 'dynamic' violates the corresponding type variable bound of 'max'.
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:21:63: Error: Inferred type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'T' on 'max'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// dynamic c = /*error:COULD_NOT_INFER*/ /*@typeArgs=dynamic*/ max(x, y);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:22:77: Error: Inferred type argument 'dynamic' violates the corresponding type variable bound of 'max'.
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:22:77: Error: Inferred type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'T' on 'max'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// var /*@type=dynamic*/ d = /*error:COULD_NOT_INFER*/ /*@typeArgs=dynamic*/ max(
|
||||
// ^
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:21:63: Error: Inferred type argument 'dynamic' violates the corresponding type variable bound of 'max'.
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:21:63: Error: Inferred type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'T' on 'max'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// dynamic c = /*error:COULD_NOT_INFER*/ /*@typeArgs=dynamic*/ max(x, y);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:22:77: Error: Inferred type argument 'dynamic' violates the corresponding type variable bound of 'max'.
|
||||
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:22:77: Error: Inferred type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'T' on 'max'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// var /*@type=dynamic*/ d = /*error:COULD_NOT_INFER*/ /*@typeArgs=dynamic*/ max(
|
||||
// ^
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// Formatted problems:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart:26:77: Error: Inferred type argument 'int' violates the corresponding type variable bound of 'Foo<dart.core::String>.method'.
|
||||
// pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart:26:77: Error: Inferred type argument 'int' doesn't conform to the bound 'String' of the type variable 'U' on 'Foo<dart.core::String>.method'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// . /*error:COULD_NOT_INFER*/ /*@typeArgs=int*/ /*@target=Foo::method*/ method(
|
||||
// ^
|
||||
|
||||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart:26:77: Error: Inferred type argument 'int' violates the corresponding type variable bound of 'Foo<dart.core::String>.method'.
|
||||
// pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart:26:77: Error: Inferred type argument 'int' doesn't conform to the bound 'String' of the type variable 'U' on 'Foo<dart.core::String>.method'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// . /*error:COULD_NOT_INFER*/ /*@typeArgs=int*/ /*@target=Foo::method*/ method(
|
||||
// ^
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
// Formatted problems:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable<dynamic>' violates the corresponding type variable bound of 'M0' in the supertype 'M0' of class 'M1 with M0'.
|
||||
// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable<dynamic>' doesn't conform to the bound 'Comparable<Y>' of the type variable 'Y' on 'M0' in the supertype 'M0' of class 'M1 with M0'.
|
||||
// - 'Comparable' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class A extends M1 with M0 {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:7:13: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:7:13: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class M0<X, Y extends Comparable<Y>> extends I<X> {}
|
||||
// ^
|
||||
|
||||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable<dynamic>' violates the corresponding type variable bound of 'M0' in the supertype 'M0' of class 'M1 with M0'.
|
||||
// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable<dynamic>' doesn't conform to the bound 'Comparable<Y>' of the type variable 'Y' on 'M0' in the supertype 'M0' of class 'M1 with M0'.
|
||||
// - 'Comparable' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class A extends M1 with M0 {}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable<dynamic>' violates the corresponding type variable bound of 'M0' in the supertype 'M0' of class 'M1 with M0'.
|
||||
// pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart:13:7: Error: Type argument 'Comparable<dynamic>' doesn't conform to the bound 'Comparable<Y>' of the type variable 'Y' on 'M0' in the supertype 'M0' of class 'M1 with M0'.
|
||||
// - 'Comparable' is from 'dart:core'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class A extends M1 with M0 {}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
// Formatted problems:
|
||||
//
|
||||
// pkg/front_end/testcases/instantiate_to_bound/inference_super_bounded_rejected.dart:11:13: Error: Inferred type argument 'Comparable<dynamic>' violates the corresponding type variable bound of 'B'.
|
||||
// pkg/front_end/testcases/instantiate_to_bound/inference_super_bounded_rejected.dart:11:13: Error: Inferred type argument 'Comparable<dynamic>' doesn't conform to the bound 'Comparable<T>' of the type variable 'T' on 'B'.
|
||||
// - 'Comparable' is from 'dart:core'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// var y = new B();
|
||||
// ^
|
||||
// pkg/front_end/testcases/instantiate_to_bound/inference_super_bounded_rejected.dart:9:9: Context: Bound of this variable is violated.
|
||||
// pkg/front_end/testcases/instantiate_to_bound/inference_super_bounded_rejected.dart:9:9: Context: This is the type variable whose bound isn't conformed to.
|
||||
// class B<T extends Comparable<T>> {}
|
||||
// ^
|
||||
|
||||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/instantiate_to_bound/inference_super_bounded_rejected.dart:11:13: Error: Inferred type argument 'Comparable<dynamic>' violates the corresponding type variable bound of 'B'.
|
||||
// pkg/front_end/testcases/instantiate_to_bound/inference_super_bounded_rejected.dart:11:13: Error: Inferred type argument 'Comparable<dynamic>' doesn't conform to the bound 'Comparable<T>' of the type variable 'T' on 'B'.
|
||||
// - 'Comparable' is from 'dart:core'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// var y = new B();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/instantiate_to_bound/inference_super_bounded_rejected.dart:11:13: Error: Inferred type argument 'Comparable<dynamic>' violates the corresponding type variable bound of 'B'.
|
||||
// pkg/front_end/testcases/instantiate_to_bound/inference_super_bounded_rejected.dart:11:13: Error: Inferred type argument 'Comparable<dynamic>' doesn't conform to the bound 'Comparable<T>' of the type variable 'T' on 'B'.
|
||||
// - 'Comparable' is from 'dart:core'.
|
||||
// Try specifying type arguments explicitly so that they conform to the bounds.
|
||||
// var y = new B();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// class Hest<X extends LinkedListEntry> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/instantiate_to_bound/non_simple_from_compiled.dart:15:12: Error: Type argument 'LinkedListEntry<dynamic>' violates the corresponding type variable bound of 'LinkedListEntry'.
|
||||
// pkg/front_end/testcases/instantiate_to_bound/non_simple_from_compiled.dart:15:12: Error: Type argument 'LinkedListEntry<dynamic>' doesn't conform to the bound 'LinkedListEntry<E>' of the type variable 'E' on 'LinkedListEntry'.
|
||||
// - 'LinkedListEntry' is from 'dart:collection'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Hest<X extends LinkedListEntry> {}
|
||||
|
@ -18,7 +18,7 @@
|
|||
// class Hest<X extends LinkedListEntry> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/instantiate_to_bound/non_simple_from_compiled.dart:15:12: Error: Type argument 'LinkedListEntry<dynamic>' violates the corresponding type variable bound of 'LinkedListEntry'.
|
||||
// pkg/front_end/testcases/instantiate_to_bound/non_simple_from_compiled.dart:15:12: Error: Type argument 'LinkedListEntry<dynamic>' doesn't conform to the bound 'LinkedListEntry<E>' of the type variable 'E' on 'LinkedListEntry'.
|
||||
// - 'LinkedListEntry' is from 'dart:collection'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Hest<X extends LinkedListEntry> {}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// class Hest<X extends LinkedListEntry> {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/instantiate_to_bound/non_simple_from_compiled.dart:15:12: Error: Type argument 'LinkedListEntry<dynamic>' violates the corresponding type variable bound of 'LinkedListEntry'.
|
||||
// pkg/front_end/testcases/instantiate_to_bound/non_simple_from_compiled.dart:15:12: Error: Type argument 'LinkedListEntry<dynamic>' doesn't conform to the bound 'LinkedListEntry<E>' of the type variable 'E' on 'LinkedListEntry'.
|
||||
// - 'LinkedListEntry' is from 'dart:collection'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// class Hest<X extends LinkedListEntry> {}
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
// this.f<U>(1.5);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart:20:16: Error: Type argument 'num' violates the corresponding type variable bound of 'C<dart.core::int>.g1'.
|
||||
// pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart:20:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'U' on 'C<dart.core::int>.g1'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// new C<int>().g1<num>();
|
||||
// ^
|
||||
|
||||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart:20:16: Error: Type argument 'num' violates the corresponding type variable bound of 'C<dart.core::int>.g1'.
|
||||
// pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart:20:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'U' on 'C<dart.core::int>.g1'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// new C<int>().g1<num>();
|
||||
// ^
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Unhandled errors:
|
||||
//
|
||||
// pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart:20:16: Error: Type argument 'num' violates the corresponding type variable bound of 'C<dart.core::int>.g1'.
|
||||
// pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart:20:16: Error: Type argument 'num' doesn't conform to the bound 'int' of the type variable 'U' on 'C<dart.core::int>.g1'.
|
||||
// Try changing type arguments so that they conform to the bounds.
|
||||
// new C<int>().g1<num>();
|
||||
// ^
|
||||
|
|
|
@ -195,6 +195,13 @@ String compileTemplate(String name, int index, String template, String tip,
|
|||
conversions.add("name3 = demangleMixinApplicationName(name3);");
|
||||
break;
|
||||
|
||||
case "name4":
|
||||
parameters.add("String name4");
|
||||
conversions.add("if (name4.isEmpty) throw 'No name provided';");
|
||||
arguments.add("'name4': name4");
|
||||
conversions.add("name4 = demangleMixinApplicationName(name4);");
|
||||
break;
|
||||
|
||||
case "lexeme":
|
||||
parameters.add("Token token");
|
||||
conversions.add("String lexeme = token.lexeme;");
|
||||
|
|
Loading…
Reference in a new issue