| Index: dart/lib/compiler/implementation/scanner/scanner_task.dart
|
| diff --git a/dart/lib/compiler/implementation/scanner/scanner_task.dart b/dart/lib/compiler/implementation/scanner/scanner_task.dart
|
| index 19a782e778a28104d3640ef7d6464710d812f24d..483704734d9b4b43d490db320038dcccda05fc67 100644
|
| --- a/dart/lib/compiler/implementation/scanner/scanner_task.dart
|
| +++ b/dart/lib/compiler/implementation/scanner/scanner_task.dart
|
| @@ -57,7 +57,7 @@ class ScannerTask extends CompilerTask {
|
| }
|
| } else if (tag.isSource()) {
|
| tagState = checkTag(TagState.SOURCE, tag);
|
| - Script script = compiler.readScript(resolved, tag);
|
| + Script script = compiler.readScript(resolved, argument);
|
| CompilationUnitElement unit =
|
| new CompilationUnitElement(script, library);
|
| compiler.withCurrentElement(unit, () => scan(unit));
|
| @@ -80,7 +80,7 @@ class ScannerTask extends CompilerTask {
|
| if (resolved.toString() == "dart:core") {
|
| implicitlyImportCoreLibrary = false;
|
| }
|
| - importLibrary(library, loadLibrary(resolved, tag), tag);
|
| + importLibrary(library, loadLibrary(resolved, argument), tag);
|
| }
|
| if (implicitlyImportCoreLibrary) {
|
| importLibrary(library, compiler.coreLibrary, null);
|
| @@ -113,7 +113,7 @@ class ScannerTask extends CompilerTask {
|
| }
|
| }
|
|
|
| - LibraryElement loadLibrary(Uri uri, ScriptTag node) {
|
| + LibraryElement loadLibrary(Uri uri, Node node) {
|
| bool newLibrary = false;
|
| LibraryElement library =
|
| compiler.universe.libraries.putIfAbsent(uri.toString(), () {
|
| @@ -134,7 +134,7 @@ class ScannerTask extends CompilerTask {
|
| ScriptTag tag) {
|
| if (!imported.hasLibraryName()) {
|
| compiler.withCurrentElement(library, () {
|
| - compiler.reportError(tag,
|
| + compiler.reportError(tag === null ? null : tag.argument,
|
| 'no #library tag found in ${imported.script.uri}');
|
| });
|
| }
|
|
|