VarSymbol vsym = (ref.paramTypes != null) ? null : findField(sym, memberName);
// prefer a field over a method with no parameters
if (vsym != null &&
(msym == null ||
types.isSubtypeUnchecked(vsym.enclClass().asType(), msym.enclClass().asType()))) {
return vsym;
} else {
return msym;
}
} catch (Abort e) { // may be thrown by Check.completionError in case of bad class file