JCExpression makeOwnerThis(DiagnosticPosition pos, Symbol sym, boolean preciseMatch) {
Symbol c = sym.owner;
if (preciseMatch ? sym.isMemberOf(currentClass, types)
: currentClass.isSubClass(sym.owner, types)) {
// in this case, `this' works fine
return make.at(pos).This(c.erasure(types));
} else {
// need to go via this$n
return makeOwnerThisN(pos, sym, preciseMatch);
}
}