Chromium Code Reviews| 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 209119570a4b6b21ddd2cb439abed3a290406533..b18fe654c5ae5f0ec024e1b50edef88fa9851780 100644 |
| --- a/pkg/analyzer/lib/src/generated/error_verifier.dart |
| +++ b/pkg/analyzer/lib/src/generated/error_verifier.dart |
| @@ -1223,6 +1223,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
| _checkForTypeParameterSupertypeOfItsBound(node); |
| _checkForTypeAnnotationDeferredClass(node.bound); |
| _checkForImplicitDynamicType(node.bound); |
| + _checkForNotInstantiatedBound(node.bound); |
| return super.visitTypeParameter(node); |
| } |
| @@ -5196,6 +5197,19 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
| } |
| } |
| + void _checkForNotInstantiatedBound(TypeAnnotation node) { |
| + if (!_options.strongMode || |
| + node == null || |
| + (node is TypeName && node.typeArguments != null)) { |
| + return; |
| + } |
| + DartType type = node.type; |
| + if (type is InterfaceType && type.element.typeParameters.isNotEmpty) { |
|
Leaf
2017/01/20 01:43:16
I don't think this handles nested types. This per
scheglov
2017/01/20 15:36:26
ACK.
https://codereview.chromium.org/2646983003 wi
|
| + _errorReporter.reportErrorForNode( |
| + StrongModeCode.NOT_INSTANTIATED_BOUND, node, [type]); |
| + } |
| + } |
| + |
| /** |
| * Verify the given operator-method [declaration], does not have an optional |
| * parameter. This method assumes that the method declaration was tested to be |