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

Unified Diff: compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java

Issue 8384012: Make some ErrorCode-s compile-time errors and some just type warnings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/backend/js/RuntimeTypeInjector.java
diff --git a/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java b/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java
index 15c5f0a3059e9f622f38885b734fa69aeaf8503e..1fdc0ce60549462c3a6f5af76f55165f0348f6b2 100644
--- a/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java
+++ b/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java
@@ -720,7 +720,8 @@ public class RuntimeTypeInjector {
SourceInfo src) {
ClassElement currentClass = enclosingClass;
Type type = typeNode.getType();
- switch (TypeKind.of(type)) {
+ TypeKind typeKind = TypeKind.of(type); // XXX
zundel 2011/10/31 19:00:28 what is // XXX for?
+ switch (typeKind) {
case INTERFACE:
InterfaceType interfaceType = (InterfaceType) type;
if (hasTypeParameters(interfaceType.getElement())
@@ -736,6 +737,11 @@ public class RuntimeTypeInjector {
case DYNAMIC:
JsProgram program = translationContext.getProgram();
return program.getTrueLiteral();
+ case FUNCTION_ALIAS:
+ // TODO(scheglov) added because of crash on DynamicTest.dart
+ // it should fail right now, but not crash
+ // I think that improvements in other place allow visitor come here, but crash.
+ return translationContext.getProgram().getFalseLiteral();
default:
throw new IllegalStateException("unexpected");
}

Powered by Google App Engine
This is Rietveld 408576698