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

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

Issue 11225007: Issue 6077. warn when importing dart:mirrors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/DartCompiler.java
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
index 751c7f6f0100703dd3c4c712455d1bff08956e40..c044940b433c925ca9e7c016cef3fa48a449bfa9 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -649,9 +649,15 @@ public class DartCompiler {
boolean hasIO = false;
boolean hasHTML = false;
for (LibraryNode importNode : lib.getImportPaths()) {
+ String libSpec = importNode.getText();
String prefix = importNode.getPrefix();
- hasIO |= "dart:io".equals(importNode.getText());
- hasHTML |= "dart:html".equals(importNode.getText());
+ hasIO |= "dart:io".equals(libSpec);
+ hasHTML |= "dart:html".equals(libSpec);
+ // "dart:mirrors" are not done yet
+ if ("dart:mirrors".equals(libSpec)) {
+ context.onError(new DartCompilationError(importNode,
+ DartCompilerErrorCode.MIRRORS_NOT_FULLY_IMPLEMENTED));
+ }
// validate import prefix
if (DartParser.PSEUDO_KEYWORDS_SET.contains(prefix)) {
context.onError(new DartCompilationError(importNode.getSourceInfo(),
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698