| 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.resolver; | 5 library analyzer.src.generated.resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| (...skipping 8353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8364 } | 8364 } |
| 8365 } else { | 8365 } else { |
| 8366 reportErrorForNode(_getInvalidTypeParametersErrorCode(node), node, | 8366 reportErrorForNode(_getInvalidTypeParametersErrorCode(node), node, |
| 8367 [typeName.name, parameterCount, argumentCount]); | 8367 [typeName.name, parameterCount, argumentCount]); |
| 8368 for (int i = 0; i < parameterCount; i++) { | 8368 for (int i = 0; i < parameterCount; i++) { |
| 8369 typeArguments[i] = dynamicType; | 8369 typeArguments[i] = dynamicType; |
| 8370 } | 8370 } |
| 8371 } | 8371 } |
| 8372 type = typeSystem.instantiateType(type, typeArguments); | 8372 type = typeSystem.instantiateType(type, typeArguments); |
| 8373 } else { | 8373 } else { |
| 8374 List<bool> hasError = [false]; | 8374 type = typeSystem.instantiateToBounds(type); |
| 8375 type = typeSystem.instantiateToBounds(type, hasError: hasError); | |
| 8376 if (hasError[0]) { | |
| 8377 errorListener.onError(new AnalysisError(source, node.offset, | |
| 8378 node.length, StrongModeCode.NO_DEFAULT_BOUNDS)); | |
| 8379 } | |
| 8380 } | 8375 } |
| 8381 typeName.staticType = type; | 8376 typeName.staticType = type; |
| 8382 node.type = type; | 8377 node.type = type; |
| 8383 } | 8378 } |
| 8384 | 8379 |
| 8385 /** | 8380 /** |
| 8386 * The number of type arguments in the given [typeName] does not match the | 8381 * The number of type arguments in the given [typeName] does not match the |
| 8387 * number of parameters in the corresponding class element. Return the error | 8382 * number of parameters in the corresponding class element. Return the error |
| 8388 * code that should be used to report this error. | 8383 * code that should be used to report this error. |
| 8389 */ | 8384 */ |
| (...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10839 return null; | 10834 return null; |
| 10840 } | 10835 } |
| 10841 if (identical(node.staticElement, variable)) { | 10836 if (identical(node.staticElement, variable)) { |
| 10842 if (node.inSetterContext()) { | 10837 if (node.inSetterContext()) { |
| 10843 result = true; | 10838 result = true; |
| 10844 } | 10839 } |
| 10845 } | 10840 } |
| 10846 return null; | 10841 return null; |
| 10847 } | 10842 } |
| 10848 } | 10843 } |
| OLD | NEW |