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

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

Issue 2762863002: Issue 28580. Relax instantiate to bounds. (Closed)
Patch Set: Created 3 years, 9 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/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index ec00b6c36e65b492e9caa18cf716328396e8454d..bf2ef53eb242f40cf57a6e26637d09f0cd611531 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -5265,13 +5265,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
if (node is TypeName) {
if (node.typeArguments == null) {
DartType type = node.type;
- if (type is ParameterizedType) {
- Element element = type.element;
- if (element is TypeParameterizedElement &&
- element.typeParameters.any((p) => p.bound != null)) {
- _errorReporter.reportErrorForNode(
- StrongModeCode.NOT_INSTANTIATED_BOUND, node, [type]);
- }
+ if (type is TypeImpl && type.hasTypeParameterReferenceInBound) {
+ _errorReporter.reportErrorForNode(
+ StrongModeCode.NOT_INSTANTIATED_BOUND, node, [type]);
}
} else {
node.typeArguments.arguments.forEach(_checkForNotInstantiatedBound);

Powered by Google App Engine
This is Rietveld 408576698