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

Side by Side Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 1181663004: Fix for explicit dart:core import. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/static_warning_code_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:analyzer/src/context/cache.dart'; 10 import 'package:analyzer/src/context/cache.dart';
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 String uriContent = importDirective.uriContent; 852 String uriContent = importDirective.uriContent;
853 if (DartUriResolver.isDartExtUri(uriContent)) { 853 if (DartUriResolver.isDartExtUri(uriContent)) {
854 libraryElement.hasExtUri = true; 854 libraryElement.hasExtUri = true;
855 } 855 }
856 Source importedSource = importDirective.source; 856 Source importedSource = importDirective.source;
857 if (importedSource != null && context.exists(importedSource)) { 857 if (importedSource != null && context.exists(importedSource)) {
858 // The imported source will be null if the URI in the import 858 // The imported source will be null if the URI in the import
859 // directive was invalid. 859 // directive was invalid.
860 LibraryElement importedLibrary = importLibraryMap[importedSource]; 860 LibraryElement importedLibrary = importLibraryMap[importedSource];
861 if (importedLibrary != null) { 861 if (importedLibrary != null) {
862 if (importedLibrary.isDartCore) {
863 explicitlyImportsCore = true;
864 }
862 ImportElementImpl importElement = 865 ImportElementImpl importElement =
863 new ImportElementImpl(directive.offset); 866 new ImportElementImpl(directive.offset);
864 StringLiteral uriLiteral = importDirective.uri; 867 StringLiteral uriLiteral = importDirective.uri;
865 if (uriLiteral != null) { 868 if (uriLiteral != null) {
866 importElement.uriOffset = uriLiteral.offset; 869 importElement.uriOffset = uriLiteral.offset;
867 importElement.uriEnd = uriLiteral.end; 870 importElement.uriEnd = uriLiteral.end;
868 } 871 }
869 importElement.uri = uriContent; 872 importElement.uri = uriContent;
870 importElement.deferred = importDirective.deferredKeyword != null; 873 importElement.deferred = importDirective.deferredKeyword != null;
871 importElement.combinators = _buildCombinators(importDirective); 874 importElement.combinators = _buildCombinators(importDirective);
(...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after
3524 @override 3527 @override
3525 bool moveNext() { 3528 bool moveNext() {
3526 if (_newSources.isEmpty) { 3529 if (_newSources.isEmpty) {
3527 return false; 3530 return false;
3528 } 3531 }
3529 currentTarget = _newSources.first; 3532 currentTarget = _newSources.first;
3530 _newSources.remove(currentTarget); 3533 _newSources.remove(currentTarget);
3531 return true; 3534 return true;
3532 } 3535 }
3533 } 3536 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/static_warning_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698