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)) { |