Symbol findInheritedMemberType(Env<AttrContext> env,Type site,Name name,TypeSymbol c){
  Symbol bestSoFar=typeNotFound;
  Symbol sym;
  Type st=types.supertype(c.type);
  if (st != null && st.hasTag(CLASS)) {
    sym=findMemberType(env,site,name,st.tsym);
    if (sym.kind < bestSoFar.kind)     bestSoFar=sym;
  }
  for (List<Type> l=types.interfaces(c.type); bestSoFar.kind != AMBIGUOUS && l.nonEmpty(); l=l.tail) {
    sym=findMemberType(env,site,name,l.head.tsym);
    if (bestSoFar.kind < AMBIGUOUS && sym.kind < AMBIGUOUS && sym.owner != bestSoFar.owner)     bestSoFar=new AmbiguityError(bestSoFar,sym);
 else     if (sym.kind < bestSoFar.kind)     bestSoFar=sym;
  }
  return bestSoFar;
}

Symbol findInheritedMemberType ( Env < AttrContext > env , Type site , Name name , TypeSymbol c ) { Symbol bestSoFar = typeNotFound ; Symbol sym ; Type st = types . supertype ( c . type ) ; if ( st != null && st . hasTag ( CLASS ) ) { sym = findMemberType ( env , site , name , st . tsym ) ; if ( sym . kind < bestSoFar . kind ) bestSoFar = sym ; } for ( List < Type > l = types . interfaces ( c . type ) ; bestSoFar . kind != AMBIGUOUS && l . nonEmpty ( ) ; l = l . tail ) { sym = findMemberType ( env , site , name , l . head . tsym ) ; if ( bestSoFar . kind < AMBIGUOUS && sym . kind < AMBIGUOUS && sym . owner != bestSoFar . owner ) bestSoFar = new AmbiguityError ( bestSoFar , sym ) ; else if ( sym . kind < bestSoFar . kind ) bestSoFar = sym ; } return bestSoFar ; }
find a member type inherited from a superclass or interface .
