Fix IMPORT_INTERNAL_LIBRARY error location

Fixes #31682

Bug: https://github.com/dart-lang/sdk/issues/31682
Change-Id: Id4f52006aa7ca3e5fb0ecce61c0393310f18764f
Reviewed-on: https://dart-review.googlesource.com/30260
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Sam Rawlins 2017-12-18 18:22:46 +00:00 committed by commit-bot@chromium.org
parent 76f30b99f5
commit 3bc3ab979e
4 changed files with 5 additions and 7 deletions

View file

@ -4225,8 +4225,8 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
_errorReporter.reportErrorForNode(
CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
directive,
[directive.uri]);
directive.uri,
[directive.uri.stringValue]);
}
/**

View file

@ -2135,7 +2135,7 @@ main() {
// TODO(jmesserly): we should change how this inference works.
// For now this test will cover what we use.
await checkFileElement('''
/*error:IMPORT_INTERNAL_LIBRARY*/import 'dart:_foreign_helper' show JS;
import /*error:IMPORT_INTERNAL_LIBRARY*/'dart:_foreign_helper' show JS;
main() {
String x = /*error:INVALID_ASSIGNMENT*/JS('int', '42');
var y = JS('String', '"hello"');

View file

@ -8,8 +8,7 @@ import 'dart:_foreign_helper';
/// ignore: IMPORT_INTERNAL_LIBRARY
import 'dart:_js_embedded_names';
/// ignore: IMPORT_INTERNAL_LIBRARY
/// ignore: UNUSED_IMPORT
/// ignore: IMPORT_INTERNAL_LIBRARY, UNUSED_IMPORT
import 'dart:_interceptors';
/*element: main:[null]*/

View file

@ -8,8 +8,7 @@ import 'dart:_foreign_helper';
/// ignore: IMPORT_INTERNAL_LIBRARY
import 'dart:_js_embedded_names';
/// ignore: IMPORT_INTERNAL_LIBRARY
/// ignore: UNUSED_IMPORT
/// ignore: IMPORT_INTERNAL_LIBRARY, UNUSED_IMPORT
import 'dart:_interceptors';
/*element: jsCallEmpty:SideEffects(reads nothing; writes nothing)*/