Skip to content

Commit

Permalink
Short circuit adding evidence params to poly functions, when there ar…
Browse files Browse the repository at this point in the history
…e no context bounds
  • Loading branch information
KacperFKorban committed Nov 14, 2024
1 parent 24e3fa0 commit f292ac5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/ast/Desugar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ object desugar {
val Function(vparams: List[untpd.ValDef] @unchecked, rhs) = fun: @unchecked
val newParamss = paramssNoContextBounds(tparams :: vparams :: Nil)
val params = evidenceParamBuf.toList
if params.isEmpty then return meth
val boundNames = getBoundNames(params, newParamss)
val recur = fitEvidenceParams(params, nme.apply, boundNames)
val (paramsFst, paramsSnd) = recur(newParamss)
Expand Down

0 comments on commit f292ac5

Please sign in to comment.