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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 11464025: dart2js: complain about missing part-of tags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: dart/sdk/lib/_internal/compiler/implementation/compiler.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
index 99cfb248bfac316fb805738aad4873d7fedb17f1..2bcd622ae19e9f6c85abc026ffe58aa11ce810bd 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -805,7 +805,7 @@ abstract class Compiler implements DiagnosticListener {
if (Elements.isErroneousElement(element)) {
element = element.enclosingElement;
}
- if (element.position() == null) {
+ if (element.position() == null && !element.isCompilationUnit()) {
// Sometimes, the backend fakes up elements that have no
// position. So we use the enclosing element instead. It is
// not a good error location, but cancel really is "internal

Powered by Google App Engine
This is Rietveld 408576698