@@ -2119,27 +2119,16 @@ trait Applications extends Compatibility {
21192119  def  resolveOverloaded (alts : List [TermRef ], pt : Type )(using  Context ):  List [TermRef ] = 
21202120    record(" resolveOverloaded" 
21212121
2122-     /**  Is `alt` a method or polytype whose approximated  result type after the first value parameter 
2122+     /**  Is `alt` a method or polytype whose result type after the first value parameter 
21232123     *  section conforms to the expected type `resultType`? If `resultType` 
21242124     *  is a `IgnoredProto`, pick the underlying type instead. 
2125-      * 
2126-      *  Using an approximated result type is necessary to avoid false negatives 
2127-      *  due to incomplete type inference such as in tests/pos/i21410.scala and tests/pos/i21410b.scala. 
21282125     */  
21292126    def  resultConforms (altSym : Symbol , altType : Type , resultType : Type )(using  Context ):  Boolean  = 
21302127      resultType.revealIgnored match  {
21312128        case  resultType : ValueType  => 
21322129          altType.widen match  {
2133-             case  tp : PolyType  =>  resultConforms(altSym, tp.resultType, resultType)
2134-             case  tp : MethodType  => 
2135-               val  wildRes  =  wildApprox(tp.resultType)
2136- 
2137-               class  ResultApprox  extends  AvoidWildcardsMap : 
2138-                 //  Avoid false negatives by approximating to a lower bound
2139-                 variance =  - 1 
2140- 
2141-               val  approx  =  ResultApprox ()(wildRes)
2142-               constrainResult(altSym, approx, resultType)
2130+             case  tp : PolyType  =>  resultConforms(altSym, instantiateWithTypeVars(tp), resultType)
2131+             case  tp : MethodType  =>  constrainResult(altSym, tp.resultType, resultType)
21432132            case  _ =>  true 
21442133          }
21452134        case  _ =>  true 
@@ -2511,7 +2500,6 @@ trait Applications extends Compatibility {
25112500      if  t.exists &&  alt.symbol.exists then 
25122501        val  (trimmed, skipped) =  trimParamss(t.stripPoly, alt.symbol.rawParamss)
25132502        val  mappedSym  =  alt.symbol.asTerm.copy(info =  t)
2514-         mappedSym.annotations =  alt.symbol.annotations
25152503        mappedSym.rawParamss =  trimmed
25162504        val  (pre, totalSkipped) =  mappedAltInfo(alt.symbol) match 
25172505          case  Some ((pre, prevSkipped)) => 
0 commit comments