Reviewers: jbrosenberg,


Please review this at http://gwt-code-reviews.appspot.com/1469802/

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java


Index: dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java b/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java index f1a4246b0258268125fe40c8ed522a6e9d753da8..65c896ba90083752f6e960bfc6bfd74f3d38eb6a 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java
@@ -1070,19 +1070,24 @@ public class UnifyAst {
   }

   private JReferenceType translate(JReferenceType type) {
+    if (type instanceof JNonNullType) {
+      return translate(type.getUnderlyingType()).getNonNull();
+    }
+
     if (type instanceof JArrayType) {
       JArrayType arrayType = (JArrayType) type;
-      type = program.getTypeArray(translate(arrayType.getElementType()));
-    } else if (type.isExternal()) {
+      return program.getTypeArray(translate(arrayType.getElementType()));
+    }
+
+    if (type.isExternal()) {
       if (type instanceof JDeclaredType) {
         type = translate((JDeclaredType) type);
-      } else if (type instanceof JNonNullType) {
-        type = translate(type.getUnderlyingType()).getNonNull();
       } else {
         assert false : "Unknown external type";
       }
+      assert !type.isExternal();
     }
-    assert !type.isExternal();
+
     return type;
   }



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to