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 ffef5db56d9e8e3af77f73dad77cd3321a68c279..26c1a026b1ecbeca910a0a526230316f194b395b 100644 |
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart |
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart |
@@ -5239,9 +5239,13 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
if (node is TypeName) { |
if (node.typeArguments == null) { |
DartType type = node.type; |
- if (type is InterfaceType && type.element.typeParameters.isNotEmpty) { |
- _errorReporter.reportErrorForNode( |
- StrongModeCode.NOT_INSTANTIATED_BOUND, node, [type]); |
+ if (type is ParameterizedType) { |
Leaf
2017/01/27 23:24:06
This change is to make this apply to typedefs.
|
+ Element element = type.element; |
+ if (element is TypeParameterizedElement && |
+ element.typeParameters.any((p) => p.bound != null)) { |
Leaf
2017/01/27 23:24:06
This change is to allow
class A<T> {}
class B<T
|
+ _errorReporter.reportErrorForNode( |
+ StrongModeCode.NOT_INSTANTIATED_BOUND, node, [type]); |
+ } |
} |
} else { |
node.typeArguments.arguments.forEach(_checkForNotInstantiatedBound); |