Revision: 6405
Author: cromwellian
Date: Fri Oct 16 16:19:37 2009
Log: Fix for Issue #4002
Patch by: cromwellian
Review by: scottb

http://code.google.com/p/google-web-toolkit/source/detail?r=6405

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java        
 
Fri Aug 21 10:53:16 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java        
 
Fri Oct 16 16:19:37 2009
@@ -1948,7 +1948,12 @@
          JExpression expr, JClassType classType) {
        if (classType.getFields().size() > 0) {
          JField field = classType.getFields().get(0);
-        if (field.getName().startsWith("this$")) {
+        /* In some circumstances, the outer this ref can be captured as a  
local
+         * value (val$this), in other cases, as a this ref (this$).
+         * TODO: investigate using more JDT node information as an  
alternative
+         */
+        if (field.getName().startsWith("this$") ||
+            field.getName().startsWith("val$this$")) {
            list.add(new JFieldRef(expr.getSourceInfo(), expr, field,
                currentClass));
          }

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

Reply via email to