957 Symbol sym = rs.lookupMethod(env, tree, site.tsym, rs.arityMethodCheck, lh); |
957 Symbol sym = rs.lookupMethod(env, tree, site.tsym, rs.arityMethodCheck, lh); |
958 |
958 |
959 if (sym.kind == Kinds.AMBIGUOUS) { |
959 if (sym.kind == Kinds.AMBIGUOUS) { |
960 Resolve.AmbiguityError err = (Resolve.AmbiguityError)sym.baseSymbol(); |
960 Resolve.AmbiguityError err = (Resolve.AmbiguityError)sym.baseSymbol(); |
961 result = ArgumentExpressionKind.PRIMITIVE; |
961 result = ArgumentExpressionKind.PRIMITIVE; |
962 for (List<Symbol> ambigousSyms = err.ambiguousSyms ; |
962 for (Symbol s : err.ambiguousSyms) { |
963 ambigousSyms.nonEmpty() && !result.isPoly() ; |
963 if (result.isPoly()) break; |
964 ambigousSyms = ambigousSyms.tail) { |
|
965 Symbol s = ambigousSyms.head; |
|
966 if (s.kind == Kinds.MTH) { |
964 if (s.kind == Kinds.MTH) { |
967 result = reduce(ArgumentExpressionKind.methodKind(s, types)); |
965 result = reduce(ArgumentExpressionKind.methodKind(s, types)); |
968 } |
966 } |
969 } |
967 } |
970 } else { |
968 } else { |