Skip to content

Commit 9e98d6d

Browse files
committed
Fix check of constructor params
`ImplicitFunctionN` does not have constructors
1 parent edd6653 commit 9e98d6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4518,7 +4518,9 @@ object Types {
45184518
case et: ExprType => true
45194519
case _ => false
45204520
}
4521-
if (zeroParams(tp.cls.primaryConstructor.info)) tp
4521+
// `ImplicitFunctionN` does not have constructors
4522+
val ctor = tp.cls.primaryConstructor
4523+
if (!ctor.exists || zeroParams(ctor.info)) tp
45224524
else NoType
45234525
case tp: AppliedType =>
45244526
zeroParamClass(tp.superType)

0 commit comments

Comments
 (0)