langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
equal
deleted
inserted
replaced
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 } |