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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java

Issue 8395013: DartC User Warning Framework (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use new ErrorCode enums in single onError() method. 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/resolver/CoreTypeProviderImplementation.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java b/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
index b14a6819fa66eee466b0776c849437e93eeb2608..edfb46a1577ec3cf61ad3cd56d69449ce67d09a0 100644
--- a/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
+++ b/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
@@ -5,7 +5,6 @@
package com.google.dart.compiler.resolver;
import com.google.dart.compiler.DartCompilationError;
-import com.google.dart.compiler.DartCompilerErrorCode;
import com.google.dart.compiler.DartCompilerListener;
import com.google.dart.compiler.parser.DartScanner.Location;
import com.google.dart.compiler.type.DynamicType;
@@ -60,11 +59,10 @@ public class CoreTypeProviderImplementation implements CoreTypeProvider {
private static InterfaceType getType(String name, Scope scope, DartCompilerListener listener) {
ClassElement element = (ClassElement) scope.findElement(scope.getLibrary(), name);
if (element == null) {
- Location location = null;
DartCompilationError error =
new DartCompilationError(null, Location.NONE,
- DartCompilerErrorCode.CANNOT_BE_RESOLVED, name);
- listener.compilationError(error);
+ ResolverErrorCode.CANNOT_BE_RESOLVED, name);
+ listener.onError(error);
return Types.newDynamicType();
}
return element.getType();

Powered by Google App Engine
This is Rietveld 408576698