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 ) ; bestSoFar = bestOf ( 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 . isResolutionError ( ) && ! sym . kind . isResolutionError ( ) && sym . owner != bestSoFar . owner ) bestSoFar = new AmbiguityError ( bestSoFar , sym ) ; else bestSoFar = bestOf ( bestSoFar , sym ) ; } return bestSoFar ; }
Find a member type inherited from a superclass or interface .