Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(617)

Unified Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 2664643002: fix #28519, assertion incorrectly triggering (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/type.dart ('k') | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 26c1a026b1ecbeca910a0a526230316f194b395b..739361e4e9518b9ad67d07064713a9a343e410e1 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -3999,7 +3999,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
}
DartType invokeType = node.staticInvokeType;
DartType declaredType = node.function.staticType;
- if (invokeType is FunctionType && declaredType is FunctionType) {
+ if (invokeType is FunctionType &&
+ declaredType is FunctionType &&
+ declaredType.typeFormals.isNotEmpty) {
Iterable<DartType> typeArgs =
FunctionTypeImpl.recoverTypeArguments(declaredType, invokeType);
if (typeArgs.any((t) => t.isDynamic)) {
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/type.dart ('k') | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698