| 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/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| (...skipping 12824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12835 * @param parameterList the list of parameters to the function | 12835 * @param parameterList the list of parameters to the function |
| 12836 */ | 12836 */ |
| 12837 void _setFunctionTypedParameterType(ParameterElementImpl element, | 12837 void _setFunctionTypedParameterType(ParameterElementImpl element, |
| 12838 TypeName returnType, FormalParameterList parameterList) { | 12838 TypeName returnType, FormalParameterList parameterList) { |
| 12839 List<ParameterElement> parameters = _getElements(parameterList); | 12839 List<ParameterElement> parameters = _getElements(parameterList); |
| 12840 FunctionElementImpl functionElement = new FunctionElementImpl.forNode(null); | 12840 FunctionElementImpl functionElement = new FunctionElementImpl.forNode(null); |
| 12841 functionElement.synthetic = true; | 12841 functionElement.synthetic = true; |
| 12842 functionElement.shareParameters(parameters); | 12842 functionElement.shareParameters(parameters); |
| 12843 functionElement.returnType = _computeReturnType(returnType); | 12843 functionElement.returnType = _computeReturnType(returnType); |
| 12844 functionElement.enclosingElement = element; | 12844 functionElement.enclosingElement = element; |
| 12845 functionElement.shareTypeParameters(element.typeParameters); |
| 12845 element.type = new FunctionTypeImpl(functionElement); | 12846 element.type = new FunctionTypeImpl(functionElement); |
| 12847 functionElement.type = element.type; |
| 12846 } | 12848 } |
| 12847 | 12849 |
| 12848 /** | 12850 /** |
| 12849 * @return `true` if the name of the given [TypeName] is an built-in identifie
r. | 12851 * @return `true` if the name of the given [TypeName] is an built-in identifie
r. |
| 12850 */ | 12852 */ |
| 12851 static bool _isBuiltInIdentifier(TypeName node) { | 12853 static bool _isBuiltInIdentifier(TypeName node) { |
| 12852 Token token = node.name.beginToken; | 12854 Token token = node.name.beginToken; |
| 12853 return token.type == TokenType.KEYWORD; | 12855 return token.type == TokenType.KEYWORD; |
| 12854 } | 12856 } |
| 12855 | 12857 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13431 nonFields.add(node); | 13433 nonFields.add(node); |
| 13432 return null; | 13434 return null; |
| 13433 } | 13435 } |
| 13434 | 13436 |
| 13435 @override | 13437 @override |
| 13436 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 13438 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
| 13437 | 13439 |
| 13438 @override | 13440 @override |
| 13439 Object visitWithClause(WithClause node) => null; | 13441 Object visitWithClause(WithClause node) => null; |
| 13440 } | 13442 } |
| OLD | NEW |