| 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 8744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8755 if (bound is TypeName) { | 8755 if (bound is TypeName) { |
| 8756 bound.type = typeParameterElement.bound; | 8756 bound.type = typeParameterElement.bound; |
| 8757 } else { | 8757 } else { |
| 8758 // TODO(brianwilkerson) Add resolution of GenericFunctionType | 8758 // TODO(brianwilkerson) Add resolution of GenericFunctionType |
| 8759 throw new ArgumentError( | 8759 throw new ArgumentError( |
| 8760 'Cannot resolve a ${bound.runtimeType}'); | 8760 'Cannot resolve a ${bound.runtimeType}'); |
| 8761 } | 8761 } |
| 8762 } else { | 8762 } else { |
| 8763 libraryScope ??= new LibraryScope(library); | 8763 libraryScope ??= new LibraryScope(library); |
| 8764 typeParametersScope ??= createTypeParametersScope(); | 8764 typeParametersScope ??= createTypeParametersScope(); |
| 8765 typeNameResolver ??= new TypeNameResolver( | 8765 typeNameResolver ??= new TypeNameResolver(typeSystem, |
| 8766 typeSystem, | 8766 typeSystem.typeProvider, library, source, errorListener); |
| 8767 typeSystem.typeProvider, | |
| 8768 library, | |
| 8769 source, | |
| 8770 errorListener); | |
| 8771 typeNameResolver.nameScope = typeParametersScope; | 8767 typeNameResolver.nameScope = typeParametersScope; |
| 8772 _resolveTypeName(bound); | 8768 _resolveTypeName(bound); |
| 8773 typeParameterElement.bound = bound.type; | 8769 typeParameterElement.bound = bound.type; |
| 8774 } | 8770 } |
| 8775 } | 8771 } |
| 8776 } | 8772 } |
| 8777 } | 8773 } |
| 8778 } | 8774 } |
| 8779 } | 8775 } |
| 8780 } | 8776 } |
| (...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10776 return null; | 10772 return null; |
| 10777 } | 10773 } |
| 10778 if (identical(node.staticElement, variable)) { | 10774 if (identical(node.staticElement, variable)) { |
| 10779 if (node.inSetterContext()) { | 10775 if (node.inSetterContext()) { |
| 10780 result = true; | 10776 result = true; |
| 10781 } | 10777 } |
| 10782 } | 10778 } |
| 10783 return null; | 10779 return null; |
| 10784 } | 10780 } |
| 10785 } | 10781 } |
| OLD | NEW |