Update of /cvsroot/nice/Nice/src/gnu/expr
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15364/src/gnu/expr
Modified Files:
Compilation.java
Log Message:
Correctly generate code for method references from inside custom constructors
and instance initializers (fixes #969777).
Index: Compilation.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/gnu/expr/Compilation.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Compilation.java 25 Mar 2004 01:39:52 -0000 1.23
--- Compilation.java 11 Jun 2004 05:01:39 -0000 1.24
***************
*** 1608,1612 ****
c.literalTable = literalTable;
topLambda = c;
! topClass = (ClassType) c.getType();
c.compileChildMethods(this);
}
--- 1608,1615 ----
c.literalTable = literalTable;
topLambda = c;
! // If the class has outer set, use that as the toplevel class.
! if (c.outer != null)
! topLambda = (LambdaExp) c.outer;
! topClass = (ClassType) topLambda.getType();
c.compileChildMethods(this);
}
***************
*** 1615,1620 ****
{
topLambda = c;
literalTable = c.literalTable;
! topClass = (ClassType) c.getType();
curClass = topClass;
--- 1618,1626 ----
{
topLambda = c;
+ // If the class has outer set, use that as the toplevel class.
+ if (c.outer != null)
+ topLambda = (LambdaExp) c.outer;
literalTable = c.literalTable;
! topClass = (ClassType) topLambda.getType();
curClass = topClass;
|