| 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 * @param identifier some simple identifier to check for deprecated use of | 510 * @param identifier some simple identifier to check for deprecated use of |
| 511 * @return `true` if and only if a hint code is generated on the passed node | 511 * @return `true` if and only if a hint code is generated on the passed node |
| 512 * See [HintCode.DEPRECATED_MEMBER_USE]. | 512 * See [HintCode.DEPRECATED_MEMBER_USE]. |
| 513 */ | 513 */ |
| 514 bool _checkForDeprecatedMemberUseAtIdentifier(SimpleIdentifier identifier) { | 514 bool _checkForDeprecatedMemberUseAtIdentifier(SimpleIdentifier identifier) { |
| 515 if (identifier.inDeclarationContext()) { | 515 if (identifier.inDeclarationContext()) { |
| 516 return false; | 516 return false; |
| 517 } | 517 } |
| 518 AstNode parent = identifier.parent; | 518 AstNode parent = identifier.parent; |
| 519 if ((parent is ConstructorName && identical(identifier, parent.name)) || | 519 if ((parent is ConstructorName && identical(identifier, parent.name)) || |
| 520 (parent is ConstructorDeclaration && |
| 521 identical(identifier, parent.returnType)) || |
| 520 (parent is SuperConstructorInvocation && | 522 (parent is SuperConstructorInvocation && |
| 521 identical(identifier, parent.constructorName)) || | 523 identical(identifier, parent.constructorName)) || |
| 522 parent is HideCombinator) { | 524 parent is HideCombinator) { |
| 523 return false; | 525 return false; |
| 524 } | 526 } |
| 525 return _checkForDeprecatedMemberUse(identifier.bestElement, identifier); | 527 return _checkForDeprecatedMemberUse(identifier.bestElement, identifier); |
| 526 } | 528 } |
| 527 | 529 |
| 528 /** | 530 /** |
| 529 * Check for the passed binary expression for the [HintCode.DIVISION_OPTIMIZAT
ION]. | 531 * Check for the passed binary expression for the [HintCode.DIVISION_OPTIMIZAT
ION]. |
| (...skipping 13068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13598 nonFields.add(node); | 13600 nonFields.add(node); |
| 13599 return null; | 13601 return null; |
| 13600 } | 13602 } |
| 13601 | 13603 |
| 13602 @override | 13604 @override |
| 13603 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 13605 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
| 13604 | 13606 |
| 13605 @override | 13607 @override |
| 13606 Object visitWithClause(WithClause node) => null; | 13608 Object visitWithClause(WithClause node) => null; |
| 13607 } | 13609 } |
| OLD | NEW |