| 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.dart.resolver.scope; | 5 library analyzer.src.dart.resolver.scope; |
| 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/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 Element element = nameSpace.get(name); | 383 Element element = nameSpace.get(name); |
| 384 if (element != null) { | 384 if (element != null) { |
| 385 if (foundElement == null) { | 385 if (foundElement == null) { |
| 386 foundElement = element; | 386 foundElement = element; |
| 387 } else if (!identical(foundElement, element)) { | 387 } else if (!identical(foundElement, element)) { |
| 388 foundElement = MultiplyDefinedElementImpl.fromElements( | 388 foundElement = MultiplyDefinedElementImpl.fromElements( |
| 389 _definingLibrary.context, foundElement, element); | 389 _definingLibrary.context, foundElement, element); |
| 390 } | 390 } |
| 391 } | 391 } |
| 392 } | 392 } |
| 393 if (foundElement is MultiplyDefinedElementImpl) { | 393 Element element = foundElement; |
| 394 foundElement = _removeSdkElements( | 394 if (element is MultiplyDefinedElementImpl) { |
| 395 identifier, name, foundElement as MultiplyDefinedElementImpl); | 395 foundElement = _removeSdkElements(identifier, name, element); |
| 396 } | 396 } |
| 397 if (foundElement is MultiplyDefinedElementImpl) { | 397 if (foundElement is MultiplyDefinedElementImpl) { |
| 398 String foundEltName = foundElement.displayName; | 398 String foundEltName = foundElement.displayName; |
| 399 List<Element> conflictingMembers = foundElement.conflictingElements; | 399 List<Element> conflictingMembers = foundElement.conflictingElements; |
| 400 int count = conflictingMembers.length; | 400 int count = conflictingMembers.length; |
| 401 List<String> libraryNames = new List<String>(count); | 401 List<String> libraryNames = new List<String>(count); |
| 402 for (int i = 0; i < count; i++) { | 402 for (int i = 0; i < count; i++) { |
| 403 libraryNames[i] = _getLibraryName(conflictingMembers[i]); | 403 libraryNames[i] = _getLibraryName(conflictingMembers[i]); |
| 404 } | 404 } |
| 405 libraryNames.sort(); | 405 libraryNames.sort(); |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 | 1050 |
| 1051 /** | 1051 /** |
| 1052 * Define the type parameters declared by the [classElement]. | 1052 * Define the type parameters declared by the [classElement]. |
| 1053 */ | 1053 */ |
| 1054 void _defineTypeParameters(ClassElement classElement) { | 1054 void _defineTypeParameters(ClassElement classElement) { |
| 1055 for (TypeParameterElement typeParameter in classElement.typeParameters) { | 1055 for (TypeParameterElement typeParameter in classElement.typeParameters) { |
| 1056 define(typeParameter); | 1056 define(typeParameter); |
| 1057 } | 1057 } |
| 1058 } | 1058 } |
| 1059 } | 1059 } |
| OLD | NEW |