We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edd6653 commit dbe5c27Copy full SHA for dbe5c27
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -4516,9 +4516,11 @@ object Types {
4516
def zeroParams(tp: Type): Boolean = tp.stripPoly match {
4517
case mt: MethodType => mt.paramInfos.isEmpty && !mt.resultType.isInstanceOf[MethodType]
4518
case et: ExprType => true
4519
- case _ => false
+ case tp => false
4520
}
4521
- if (zeroParams(tp.cls.primaryConstructor.info)) tp
+ // `ImplicitFunctionN` does not have constructors
4522
+ val ctor = tp.cls.primaryConstructor
4523
+ if (!ctor.exists || zeroParams(ctor.info)) tp
4524
else NoType
4525
case tp: AppliedType =>
4526
zeroParamClass(tp.superType)
0 commit comments