| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.src.generated.error_verifier; | 5 library analyzer.src.generated.error_verifier; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import "dart:math" as math; | 8 import "dart:math" as math; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 5247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5258 } | 5258 } |
| 5259 | 5259 |
| 5260 void _checkForNotInstantiatedBound(TypeAnnotation node) { | 5260 void _checkForNotInstantiatedBound(TypeAnnotation node) { |
| 5261 if (!_options.strongMode || node == null) { | 5261 if (!_options.strongMode || node == null) { |
| 5262 return; | 5262 return; |
| 5263 } | 5263 } |
| 5264 | 5264 |
| 5265 if (node is TypeName) { | 5265 if (node is TypeName) { |
| 5266 if (node.typeArguments == null) { | 5266 if (node.typeArguments == null) { |
| 5267 DartType type = node.type; | 5267 DartType type = node.type; |
| 5268 if (type is ParameterizedType) { | 5268 if (type is TypeImpl && type.hasTypeParameterReferenceInBound) { |
| 5269 Element element = type.element; | 5269 _errorReporter.reportErrorForNode( |
| 5270 if (element is TypeParameterizedElement && | 5270 StrongModeCode.NOT_INSTANTIATED_BOUND, node, [type]); |
| 5271 element.typeParameters.any((p) => p.bound != null)) { | |
| 5272 _errorReporter.reportErrorForNode( | |
| 5273 StrongModeCode.NOT_INSTANTIATED_BOUND, node, [type]); | |
| 5274 } | |
| 5275 } | 5271 } |
| 5276 } else { | 5272 } else { |
| 5277 node.typeArguments.arguments.forEach(_checkForNotInstantiatedBound); | 5273 node.typeArguments.arguments.forEach(_checkForNotInstantiatedBound); |
| 5278 } | 5274 } |
| 5279 } else { | 5275 } else { |
| 5280 throw new UnimplementedError('${node.runtimeType}'); | 5276 throw new UnimplementedError('${node.runtimeType}'); |
| 5281 } | 5277 } |
| 5282 } | 5278 } |
| 5283 | 5279 |
| 5284 /** | 5280 /** |
| (...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7094 class _InvocationCollector extends RecursiveAstVisitor { | 7090 class _InvocationCollector extends RecursiveAstVisitor { |
| 7095 final List<String> superCalls = <String>[]; | 7091 final List<String> superCalls = <String>[]; |
| 7096 | 7092 |
| 7097 @override | 7093 @override |
| 7098 visitMethodInvocation(MethodInvocation node) { | 7094 visitMethodInvocation(MethodInvocation node) { |
| 7099 if (node.target is SuperExpression) { | 7095 if (node.target is SuperExpression) { |
| 7100 superCalls.add(node.methodName.name); | 7096 superCalls.add(node.methodName.name); |
| 7101 } | 7097 } |
| 7102 } | 7098 } |
| 7103 } | 7099 } |
| OLD | NEW |