langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
changeset 26990 e3fd4b46d39d
parent 25874 83c19f00452c
child 27224 228abfa87080
equal deleted inserted replaced
26904:9618201c5df2 26990:e3fd4b46d39d
   823 
   823 
   824         private JCExpression makeReceiver(VarSymbol rcvr) {
   824         private JCExpression makeReceiver(VarSymbol rcvr) {
   825             if (rcvr == null) return null;
   825             if (rcvr == null) return null;
   826             JCExpression rcvrExpr = make.Ident(rcvr);
   826             JCExpression rcvrExpr = make.Ident(rcvr);
   827             Type rcvrType = tree.sym.enclClass().type;
   827             Type rcvrType = tree.sym.enclClass().type;
       
   828             if (rcvrType == syms.arrayClass.type) {
       
   829                 // Map the receiver type to the actually type, not just "array"
       
   830                 rcvrType = tree.getQualifierExpression().type;
       
   831             }
   828             if (!rcvr.type.tsym.isSubClass(rcvrType.tsym, types)) {
   832             if (!rcvr.type.tsym.isSubClass(rcvrType.tsym, types)) {
   829                 rcvrExpr = make.TypeCast(make.Type(rcvrType), rcvrExpr).setType(rcvrType);
   833                 rcvrExpr = make.TypeCast(make.Type(rcvrType), rcvrExpr).setType(rcvrType);
   830             }
   834             }
   831             return rcvrExpr;
   835             return rcvrExpr;
   832         }
   836         }