Skip to content

Commit f292ac5

Browse files
committed
Short circuit adding evidence params to poly functions, when there are no context bounds
1 parent 24e3fa0 commit f292ac5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

+1
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ object desugar {
351351
val Function(vparams: List[untpd.ValDef] @unchecked, rhs) = fun: @unchecked
352352
val newParamss = paramssNoContextBounds(tparams :: vparams :: Nil)
353353
val params = evidenceParamBuf.toList
354+
if params.isEmpty then return meth
354355
val boundNames = getBoundNames(params, newParamss)
355356
val recur = fitEvidenceParams(params, nme.apply, boundNames)
356357
val (paramsFst, paramsSnd) = recur(newParamss)

0 commit comments

Comments
 (0)