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 10165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10176 } | 10176 } |
10177 | 10177 |
10178 /** | 10178 /** |
10179 * Given the [returnType] of a function, compute the return type of the | 10179 * Given the [returnType] of a function, compute the return type of the |
10180 * function. | 10180 * function. |
10181 */ | 10181 */ |
10182 DartType _computeReturnType(TypeAnnotation returnType) { | 10182 DartType _computeReturnType(TypeAnnotation returnType) { |
10183 if (returnType == null) { | 10183 if (returnType == null) { |
10184 return _dynamicType; | 10184 return _dynamicType; |
10185 } else { | 10185 } else { |
10186 return returnType.type; | 10186 return _typeNameResolver._getType(returnType); |
10187 } | 10187 } |
10188 } | 10188 } |
10189 | 10189 |
10190 /** | 10190 /** |
10191 * Return the class element that represents the class whose name was provided. | 10191 * Return the class element that represents the class whose name was provided. |
10192 * | 10192 * |
10193 * @param identifier the name from the declaration of a class | 10193 * @param identifier the name from the declaration of a class |
10194 * @return the class element that represents the class | 10194 * @return the class element that represents the class |
10195 */ | 10195 */ |
10196 ClassElementImpl _getClassElement(SimpleIdentifier identifier) { | 10196 ClassElementImpl _getClassElement(SimpleIdentifier identifier) { |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10927 return null; | 10927 return null; |
10928 } | 10928 } |
10929 if (identical(node.staticElement, variable)) { | 10929 if (identical(node.staticElement, variable)) { |
10930 if (node.inSetterContext()) { | 10930 if (node.inSetterContext()) { |
10931 result = true; | 10931 result = true; |
10932 } | 10932 } |
10933 } | 10933 } |
10934 return null; | 10934 return null; |
10935 } | 10935 } |
10936 } | 10936 } |
OLD | NEW |