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

Unified Diff: compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java

Issue 8229028: Don't allow a #source directive in a library unit include itself (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor cleanup from previous, removed some debugging code Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java
diff --git a/compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java b/compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java
index f6aa86641a7274e0827eb99e374c62f837538544..dca14d8347746d144d8f1f308c5d53eb8967a267 100644
--- a/compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java
+++ b/compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java
@@ -32,8 +32,8 @@ public class PrettyErrorFormatter extends DefaultErrorFormatter {
public void format(DartCompilationError event) {
Source sourceFile = event.getSource();
- // if no source file is available, default to the basic error formatter
- if (!(sourceFile instanceof DartSource)) {
+ // if this is an unknown source type, default to the basic error formatter
+ if (!(sourceFile instanceof DartSource) && !(sourceFile instanceof LibrarySource)) {
super.format(event);
return;
}

Powered by Google App Engine
This is Rietveld 408576698