| 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 8366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8377 } | 8377 } |
| 8378 } else { | 8378 } else { |
| 8379 reportErrorForNode(_getInvalidTypeParametersErrorCode(node), node, | 8379 reportErrorForNode(_getInvalidTypeParametersErrorCode(node), node, |
| 8380 [typeName.name, parameterCount, argumentCount]); | 8380 [typeName.name, parameterCount, argumentCount]); |
| 8381 for (int i = 0; i < parameterCount; i++) { | 8381 for (int i = 0; i < parameterCount; i++) { |
| 8382 typeArguments[i] = dynamicType; | 8382 typeArguments[i] = dynamicType; |
| 8383 } | 8383 } |
| 8384 } | 8384 } |
| 8385 type = typeSystem.instantiateType(type, typeArguments); | 8385 type = typeSystem.instantiateType(type, typeArguments); |
| 8386 } else { | 8386 } else { |
| 8387 type = typeSystem.instantiateToBounds(type); | 8387 List<bool> hasError = [false]; |
| 8388 type = typeSystem.instantiateToBounds(type, hasError: hasError); |
| 8389 if (hasError[0]) { |
| 8390 errorListener.onError(new AnalysisError(source, node.offset, |
| 8391 node.length, StrongModeCode.NO_DEFAULT_BOUNDS)); |
| 8392 } |
| 8388 } | 8393 } |
| 8389 typeName.staticType = type; | 8394 typeName.staticType = type; |
| 8390 node.type = type; | 8395 node.type = type; |
| 8391 } | 8396 } |
| 8392 | 8397 |
| 8393 /** | 8398 /** |
| 8394 * The number of type arguments in the given [typeName] does not match the | 8399 * The number of type arguments in the given [typeName] does not match the |
| 8395 * number of parameters in the corresponding class element. Return the error | 8400 * number of parameters in the corresponding class element. Return the error |
| 8396 * code that should be used to report this error. | 8401 * code that should be used to report this error. |
| 8397 */ | 8402 */ |
| (...skipping 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10830 return null; | 10835 return null; |
| 10831 } | 10836 } |
| 10832 if (identical(node.staticElement, variable)) { | 10837 if (identical(node.staticElement, variable)) { |
| 10833 if (node.inSetterContext()) { | 10838 if (node.inSetterContext()) { |
| 10834 result = true; | 10839 result = true; |
| 10835 } | 10840 } |
| 10836 } | 10841 } |
| 10837 return null; | 10842 return null; |
| 10838 } | 10843 } |
| 10839 } | 10844 } |
| OLD | NEW |