src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java

changeset 3102
e74dd6df4d4c
parent 3076
30f0dce3fbd3
child 3167
d5af468ae383
equal deleted inserted replaced
3092:8c3890c90147 3102:e74dd6df4d4c
858 } 858 }
859 859
860 private JCExpression makeReceiver(VarSymbol rcvr) { 860 private JCExpression makeReceiver(VarSymbol rcvr) {
861 if (rcvr == null) return null; 861 if (rcvr == null) return null;
862 JCExpression rcvrExpr = make.Ident(rcvr); 862 JCExpression rcvrExpr = make.Ident(rcvr);
863 Type rcvrType = tree.sym.enclClass().type; 863 Type rcvrType = tree.ownerAccessible ? tree.sym.enclClass().type : tree.expr.type;
864 if (rcvrType == syms.arrayClass.type) { 864 if (rcvrType == syms.arrayClass.type) {
865 // Map the receiver type to the actually type, not just "array" 865 // Map the receiver type to the actually type, not just "array"
866 rcvrType = tree.getQualifierExpression().type; 866 rcvrType = tree.getQualifierExpression().type;
867 } 867 }
868 if (!rcvr.type.tsym.isSubClass(rcvrType.tsym, types)) { 868 if (!rcvr.type.tsym.isSubClass(rcvrType.tsym, types)) {

mercurial