@@ -2226,18 +2226,20 @@ trait Applications extends Compatibility {
22262226    record(s " resolveOverloaded1 " , alts.length)
22272227
22282228    val  sv  =  Feature .sourceVersion
2229-     val  isOldPriorityVersion :  Boolean  =  sv.isAtMost(SourceVersion .`3.6 `)
2230-     val  isWarnPriorityChangeVersion  =  sv ==  SourceVersion .`3.6 ` ||  sv ==  SourceVersion .`3.7 -migration`
2229+     val  isOldPriorityVersion :  Boolean  =  sv.isAtMost(SourceVersion .`3.7 `)
2230+     val  isWarnPriorityChangeVersion  =  sv ==  SourceVersion .`3.7 ` ||  sv ==  SourceVersion .`3.8 -migration`
22312231
2232-     inline  def  warnOnPriorityChange (oldCands : List [TermRef ], newCands : List [TermRef ])(f : List [TermRef ] =>  List [TermRef ]):  List [TermRef ] = 
2232+     def  warnOnPriorityChange (oldCands : List [TermRef ], newCands : List [TermRef ])(f : List [TermRef ] =>  List [TermRef ]):  List [TermRef ] = 
2233+       lazy  val  oldRes  =  f(oldCands)
2234+       val  newRes  =  f(newCands)
22332235
22342236      def  doWarn (oldChoice : String , newChoice : String ):  Unit  = 
22352237        val  (change, whichChoice) = 
22362238          if  isOldPriorityVersion
22372239          then  (" will change" " Current choice " 
22382240          else  (" has changed" " Previous choice" 
22392241
2240-         val  msg  =  //  uses  oldCands as the  list of  alternatives since  they should be a superset of newCands
2242+         val  msg  =  //  using  oldCands to  list the  alternatives as  they should be a superset of newCands
22412243          em """ Overloading resolution for  ${err.expectedTypeStr(pt)} between alternatives 
22422244              |  ${oldCands map (_.info)}%\n % 
22432245              | $change. 
@@ -2247,9 +2249,6 @@ trait Applications extends Compatibility {
22472249        report.warning(msg, srcPos)
22482250      end  doWarn 
22492251
2250-       lazy  val  oldRes  =  f(oldCands)
2251-       val  newRes  =  f(newCands)
2252- 
22532252      if  isWarnPriorityChangeVersion then  (oldRes, newRes) match 
22542253        case  (oldAlt ::  Nil , newAlt ::  Nil ) if  oldAlt !=  newAlt =>  doWarn(oldAlt.info.show, newAlt.info.show)
22552254        case  (oldAlt ::  Nil , Nil ) =>  doWarn(oldAlt.info.show, " none" 
0 commit comments