equal
deleted
inserted
replaced
654 // check for same erasure |
654 // check for same erasure |
655 if (!types.isSameType(m1.erasure(types), m2.erasure(types))) |
655 if (!types.isSameType(m1.erasure(types), m2.erasure(types))) |
656 return new AmbiguityError(m1, m2); |
656 return new AmbiguityError(m1, m2); |
657 // both abstract, neither overridden; merge throws clause and result type |
657 // both abstract, neither overridden; merge throws clause and result type |
658 Symbol result; |
658 Symbol result; |
659 Type result2 = mt2.getReturnType();; |
659 Type result2 = mt2.getReturnType(); |
660 if (mt2.tag == FORALL) |
660 if (mt2.tag == FORALL) |
661 result2 = types.subst(result2, ((ForAll)mt2).tvars, ((ForAll)mt1).tvars); |
661 result2 = types.subst(result2, ((ForAll)mt2).tvars, ((ForAll)mt1).tvars); |
662 if (types.isSubtype(mt1.getReturnType(), result2)) { |
662 if (types.isSubtype(mt1.getReturnType(), result2)) { |
663 result = m1; |
663 result = m1; |
664 } else if (types.isSubtype(result2, mt1.getReturnType())) { |
664 } else if (types.isSubtype(result2, mt1.getReturnType())) { |
1097 sym = ((ResolveError)sym).sym; |
1097 sym = ((ResolveError)sym).sym; |
1098 } while (sym.kind >= AMBIGUOUS); |
1098 } while (sym.kind >= AMBIGUOUS); |
1099 if (sym == syms.errSymbol // preserve the symbol name through errors |
1099 if (sym == syms.errSymbol // preserve the symbol name through errors |
1100 || ((sym.kind & ERRONEOUS) == 0 // make sure an error symbol is returned |
1100 || ((sym.kind & ERRONEOUS) == 0 // make sure an error symbol is returned |
1101 && (sym.kind & TYP) != 0)) |
1101 && (sym.kind & TYP) != 0)) |
1102 sym = new ErrorType(name, qualified?site.tsym:syms.noSymbol).tsym; |
1102 sym = types.createErrorType(name, qualified ? site.tsym : syms.noSymbol, sym.type).tsym; |
1103 } |
1103 } |
1104 return sym; |
1104 return sym; |
1105 } |
1105 } |
1106 |
1106 |
1107 /** Same as above, but without type arguments and arguments. |
1107 /** Same as above, but without type arguments and arguments. |