Chromium Code Reviews| 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"); |
| } |