mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:11:19 +00:00
Improve the highlight range for type_parameter_supertype_of_its_bound
Change-Id: I6184d09bac93a634a08441b3fcee8c4dcf816387 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204361 Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
497f1020a8
commit
430709cd1d
|
@ -4019,7 +4019,7 @@ class ErrorVerifier extends RecursiveAstVisitor<void>
|
|||
var element = parameter.declaredElement!;
|
||||
errorReporter.reportErrorForNode(
|
||||
CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
|
||||
parameter,
|
||||
parameter.name,
|
||||
[element.displayName, element.bound],
|
||||
);
|
||||
break;
|
||||
|
|
|
@ -22,7 +22,7 @@ class TypeParameterSupertypeOfItsBoundTest extends PubPackageResolutionTest
|
|||
class A<T extends T> {
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 11),
|
||||
error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ class A<T extends T> {
|
|||
}
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 11),
|
||||
error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -43,8 +43,8 @@ class A<T extends T> {
|
|||
class A<T1 extends T3, T2, T3 extends T1> {
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 13),
|
||||
error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 27, 13),
|
||||
error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 2),
|
||||
error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 27, 2),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue