Author: [email protected]
Date: Fri Jun  5 05:17:27 2009
New Revision: 5510

Modified:
    trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JClassLiteral.java

Log:
Fix incorrect AST generation when setting up calls to class literal factory  
methods.

Patch by: bobv
Review by: scottb


Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JClassLiteral.java
==============================================================================
--- trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JClassLiteral.java     
(original)
+++ trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JClassLiteral.java    Fri  
Jun  5 05:17:27 2009
@@ -61,8 +61,8 @@
        JDeclaredType arrayType = program.getIndexedType("Array");
        call.addArg(new JNameOf(info, program, arrayType));

-    } else if (type instanceof JDeclaredType) {
-      // Add the name of the seed function for non-array reference types
+    } else if (type instanceof JClassType) {
+      // Add the name of the seed function for concrete types
        call.addArg(new JNameOf(info, program, type));

      } else if (type instanceof JPrimitiveType) {
@@ -118,6 +118,8 @@
      } else {
        assert (type instanceof JInterfaceType || type instanceof  
JPrimitiveType);
      }
+    assert call.getArgs().size() == method.getParams().size() : "Argument  
/ param mismatch "
+        + call.toString() + " versus " + method.toString();
      return call;
    }


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

Reply via email to