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

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

Issue 2640143007: Issue 28100. Implement new strong mode instantiate to bound rules in analyzer. (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
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 60c2700d50fd22000e80afe4c90c1777ab7d559a..2a1cc4532e44aba90eade5296706faca75d2ee8a 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -8384,7 +8384,12 @@ class TypeNameResolver {
}
type = typeSystem.instantiateType(type, typeArguments);
} else {
- type = typeSystem.instantiateToBounds(type);
+ List<bool> hasError = [false];
+ type = typeSystem.instantiateToBounds(type, hasError: hasError);
+ if (hasError[0]) {
+ errorListener.onError(new AnalysisError(source, node.offset,
+ node.length, StrongModeCode.UNABLE_INSTANTIATE_TO_BOUNDS));
+ }
}
typeName.staticType = type;
node.type = type;

Powered by Google App Engine
This is Rietveld 408576698