mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:07:49 +00:00
Don't try to supply arguments to GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND error.
The error message text is: Generic function types can't be used as type parameter bounds And the correction message is: Try making the free variable in the function type part of the larger declaration signature There are no placeholders in these messages to accept arguments, and there's really no need for any (since the location of the error is the offending type), so just remove the argument. Change-Id: I0ea653d7085782f924c63fbdb0e19ac66f04808a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213700 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
eead1f7f5c
commit
5844340c73
|
@ -2524,9 +2524,7 @@ class ErrorVerifier extends RecursiveAstVisitor<void>
|
|||
DartType type = node.typeOrThrow;
|
||||
if (type is FunctionType && type.typeFormals.isNotEmpty) {
|
||||
errorReporter.reportErrorForNode(
|
||||
CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND,
|
||||
node,
|
||||
[type]);
|
||||
CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, node);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue