Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 2182593004: Issue 26747. Report HintCode.UNDEFINED_SHOWN_NAME, but not HintCode.UNUSED_SHOWN_NAME for unresolve… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 4637 matching lines...) Expand 10 before | Expand all | Expand 10 after
4648 */ 4648 */
4649 void _addShownNames(ImportDirective importDirective) { 4649 void _addShownNames(ImportDirective importDirective) {
4650 if (importDirective.combinators == null) { 4650 if (importDirective.combinators == null) {
4651 return; 4651 return;
4652 } 4652 }
4653 List<SimpleIdentifier> identifiers = new List<SimpleIdentifier>(); 4653 List<SimpleIdentifier> identifiers = new List<SimpleIdentifier>();
4654 _unusedShownNamesMap[importDirective] = identifiers; 4654 _unusedShownNamesMap[importDirective] = identifiers;
4655 for (Combinator combinator in importDirective.combinators) { 4655 for (Combinator combinator in importDirective.combinators) {
4656 if (combinator is ShowCombinator) { 4656 if (combinator is ShowCombinator) {
4657 for (SimpleIdentifier name in combinator.shownNames) { 4657 for (SimpleIdentifier name in combinator.shownNames) {
4658 identifiers.add(name); 4658 if (name.staticElement != null) {
4659 identifiers.add(name);
4660 }
4659 } 4661 }
4660 } 4662 }
4661 } 4663 }
4662 } 4664 }
4663 4665
4664 /** 4666 /**
4665 * Lookup and return the [Namespace] from the [_namespaceMap]. 4667 * Lookup and return the [Namespace] from the [_namespaceMap].
4666 * 4668 *
4667 * If the map does not have the computed namespace, compute it and cache it in the map. If 4669 * If the map does not have the computed namespace, compute it and cache it in the map. If
4668 * [importDirective] is not resolved or is not resolvable, `null` is returned. 4670 * [importDirective] is not resolved or is not resolvable, `null` is returned.
(...skipping 6420 matching lines...) Expand 10 before | Expand all | Expand 10 after
11089 return null; 11091 return null;
11090 } 11092 }
11091 if (identical(node.staticElement, variable)) { 11093 if (identical(node.staticElement, variable)) {
11092 if (node.inSetterContext()) { 11094 if (node.inSetterContext()) {
11093 result = true; 11095 result = true;
11094 } 11096 }
11095 } 11097 }
11096 return null; 11098 return null;
11097 } 11099 }
11098 } 11100 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698