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 6651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6662 | 6662 |
6663 FunctionType _inferArgumentTypesForGeneric(AstNode inferenceNode, | 6663 FunctionType _inferArgumentTypesForGeneric(AstNode inferenceNode, |
6664 DartType uninstantiatedType, TypeArgumentList typeArguments, | 6664 DartType uninstantiatedType, TypeArgumentList typeArguments, |
6665 {AstNode errorNode}) { | 6665 {AstNode errorNode}) { |
6666 errorNode ??= inferenceNode; | 6666 errorNode ??= inferenceNode; |
6667 TypeSystem ts = typeSystem; | 6667 TypeSystem ts = typeSystem; |
6668 if (typeArguments == null && | 6668 if (typeArguments == null && |
6669 uninstantiatedType is FunctionType && | 6669 uninstantiatedType is FunctionType && |
6670 uninstantiatedType.typeFormals.isNotEmpty && | 6670 uninstantiatedType.typeFormals.isNotEmpty && |
6671 ts is StrongTypeSystemImpl) { | 6671 ts is StrongTypeSystemImpl) { |
6672 return ts.inferGenericFunctionOrType/*<FunctionType>*/( | 6672 return ts.inferGenericFunctionOrType<FunctionType>( |
6673 uninstantiatedType, | 6673 uninstantiatedType, |
6674 ParameterElement.EMPTY_LIST, | 6674 ParameterElement.EMPTY_LIST, |
6675 DartType.EMPTY_LIST, | 6675 DartType.EMPTY_LIST, |
6676 InferenceContext.getContext(inferenceNode), | 6676 InferenceContext.getContext(inferenceNode), |
6677 downwards: true, | 6677 downwards: true, |
6678 errorReporter: errorReporter, | 6678 errorReporter: errorReporter, |
6679 errorNode: errorNode); | 6679 errorNode: errorNode); |
6680 } | 6680 } |
6681 return null; | 6681 return null; |
6682 } | 6682 } |
(...skipping 4253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10936 return null; | 10936 return null; |
10937 } | 10937 } |
10938 if (identical(node.staticElement, variable)) { | 10938 if (identical(node.staticElement, variable)) { |
10939 if (node.inSetterContext()) { | 10939 if (node.inSetterContext()) { |
10940 result = true; | 10940 result = true; |
10941 } | 10941 } |
10942 } | 10942 } |
10943 return null; | 10943 return null; |
10944 } | 10944 } |
10945 } | 10945 } |
OLD | NEW |