| 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.element_resolver; | 5 library analyzer.src.generated.element_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/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2446 setter = _lookUpSetter(null, enclosingClass.type, identifier.name); | 2446 setter = _lookUpSetter(null, enclosingClass.type, identifier.name); |
| 2447 } | 2447 } |
| 2448 } | 2448 } |
| 2449 if (setter != null) { | 2449 if (setter != null) { |
| 2450 element = setter; | 2450 element = setter; |
| 2451 } | 2451 } |
| 2452 } | 2452 } |
| 2453 } else if (element == null && | 2453 } else if (element == null && |
| 2454 (identifier.inSetterContext() || | 2454 (identifier.inSetterContext() || |
| 2455 identifier.parent is CommentReference)) { | 2455 identifier.parent is CommentReference)) { |
| 2456 element = _resolver.nameScope.lookup( | 2456 Identifier setterId = |
| 2457 new SyntheticIdentifier("${identifier.name}=", identifier), | 2457 new SyntheticIdentifier('${identifier.name}=', identifier); |
| 2458 _definingLibrary); | 2458 element = _resolver.nameScope.lookup(setterId, _definingLibrary); |
| 2459 identifier.setProperty(LibraryImportScope.conflictingSdkElements, |
| 2460 setterId.getProperty(LibraryImportScope.conflictingSdkElements)); |
| 2459 } | 2461 } |
| 2460 ClassElement enclosingClass = _resolver.enclosingClass; | 2462 ClassElement enclosingClass = _resolver.enclosingClass; |
| 2461 if (element == null && enclosingClass != null) { | 2463 if (element == null && enclosingClass != null) { |
| 2462 InterfaceType enclosingType = enclosingClass.type; | 2464 InterfaceType enclosingType = enclosingClass.type; |
| 2463 if (element == null && | 2465 if (element == null && |
| 2464 (identifier.inSetterContext() || | 2466 (identifier.inSetterContext() || |
| 2465 identifier.parent is CommentReference)) { | 2467 identifier.parent is CommentReference)) { |
| 2466 element = _lookUpSetter(null, enclosingType, identifier.name); | 2468 element = _lookUpSetter(null, enclosingType, identifier.name); |
| 2467 } | 2469 } |
| 2468 if (element == null && identifier.inGetterContext()) { | 2470 if (element == null && identifier.inGetterContext()) { |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2634 | 2636 |
| 2635 @override | 2637 @override |
| 2636 Element get staticElement => null; | 2638 Element get staticElement => null; |
| 2637 | 2639 |
| 2638 @override | 2640 @override |
| 2639 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null; | 2641 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null; |
| 2640 | 2642 |
| 2641 @override | 2643 @override |
| 2642 void visitChildren(AstVisitor visitor) {} | 2644 void visitChildren(AstVisitor visitor) {} |
| 2643 } | 2645 } |
| OLD | NEW |