Skip to content

Commit 797e261

Browse files
committed
Fix arity check
1 parent 7433f3f commit 797e261

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/TypeErasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
601601
assert(refinedInfo.isInstanceOf[PolyType])
602602
val res = refinedInfo.resultType
603603
val paramss = res.paramNamess
604+
assert(paramss.length <= 1)
604605
val arity = if paramss.isEmpty then 0 else paramss.head.length
605-
assert(arity <= 1)
606606
this(defn.FunctionType(arity, isContextual = res.isImplicitMethod, isErased = res.isErasedMethod))
607607
case tp: TypeProxy =>
608608
this(tp.underlying)

0 commit comments

Comments
 (0)