Closed
Description
Compiler version
3.0.0
Minimized code
class Fun[|*|[_, _]] {
enum ->[A, B] {
case BiId[X, Y]() extends ((X |*| Y) -> (X |*| Y))
}
def go[A, B](f: A -> B): Unit =
f match {
case ->.BiId() => ()
}
}
Output (click arrow to expand)
exception occurred while compiling Fun.scala
bad parameter reference (param)3#|*| at pruneErasedDefs
the parameter is type |*| in class Fun but the prefix (param)3
does not define any corresponding arguments.
idx = 0, args = List() while compiling Fun.scala
Exception in thread "main" dotty.tools.dotc.core.TypeError: bad parameter reference (param)3#|*| at pruneErasedDefs
the parameter is type |*| in class Fun but the prefix (param)3
does not define any corresponding arguments.
idx = 0, args = List()
at dotty.tools.dotc.core.Types$NamedType.argDenot(Types.scala:2263)
at dotty.tools.dotc.core.Types$NamedType.fromDesignator$1(Types.scala:2177)
at dotty.tools.dotc.core.Types$NamedType.computeDenot(Types.scala:2195)
at dotty.tools.dotc.core.Types$NamedType.denot(Types.scala:2150)
at dotty.tools.dotc.core.Types$NamedType.info(Types.scala:2138)
at dotty.tools.dotc.core.TypeApplications$.typeParams$extension(TypeApplications.scala:185)
at dotty.tools.dotc.core.TypeApplications$.appliedTo$extension(TypeApplications.scala:313)
at dotty.tools.dotc.core.Types$AppliedType.derivedAppliedType(Types.scala:4169)
at dotty.tools.dotc.core.Types$ApproximatingTypeMap.derivedAppliedType(Types.scala:5544)
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:5218)
at dotty.tools.dotc.core.TypeOps$AsSeenFromMap.apply(TypeOps.scala:110)
at dotty.tools.dotc.core.Types$TypeMap.op$proxy16$1(Types.scala:5183)
at dotty.tools.dotc.core.Types$TypeMap.mapArgs(Types.scala:5183)
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:5218)
at dotty.tools.dotc.core.TypeOps$AsSeenFromMap.apply(TypeOps.scala:110)
at dotty.tools.dotc.core.TypeOps$.asSeenFrom(TypeOps.scala:55)
at dotty.tools.dotc.core.Types$Type.asSeenFrom(Types.scala:1012)
at dotty.tools.dotc.core.SymDenotations$ClassDenotation.computeTypeRef$1(SymDenotations.scala:2051)
at dotty.tools.dotc.core.SymDenotations$ClassDenotation.recur$1(SymDenotations.scala:2064)
at dotty.tools.dotc.core.SymDenotations$ClassDenotation.computeApplied$1(SymDenotations.scala:2075)
at dotty.tools.dotc.core.SymDenotations$ClassDenotation.recur$1(SymDenotations.scala:2080)
at dotty.tools.dotc.core.SymDenotations$ClassDenotation.baseTypeOf(SymDenotations.scala:2138)
at dotty.tools.dotc.core.Types$Type.baseType(Types.scala:1115)
at dotty.tools.dotc.core.TypeComparer.nonExprBaseType(TypeComparer.scala:1286)
at dotty.tools.dotc.core.TypeComparer.tryBaseType$1(TypeComparer.scala:740)
at dotty.tools.dotc.core.TypeComparer.compareAppliedType2$1(TypeComparer.scala:1159)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:556)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:487)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:369)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1267)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:180)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:190)
at dotty.tools.dotc.core.TypeComparer.topLevelSubType(TypeComparer.scala:128)
at dotty.tools.dotc.core.TypeComparer$.topLevelSubType(TypeComparer.scala:2603)
at dotty.tools.dotc.core.Types$Type.$less$colon$less(Types.scala:1020)
at dotty.tools.dotc.core.TypeOps$.instantiateToSubType(TypeOps.scala:786)
at dotty.tools.dotc.core.TypeOps$.refineUsingParent(TypeOps.scala:671)
at dotty.tools.dotc.transform.patmat.SpaceEngine.$anonfun$5(Space.scala:619)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.transform.patmat.SpaceEngine.decompose(Space.scala:633)
at dotty.tools.dotc.transform.patmat.SpaceLogic.tryDecompose1$3(Space.scala:239)
at dotty.tools.dotc.transform.patmat.SpaceLogic.minus(Space.scala:253)
at dotty.tools.dotc.transform.patmat.SpaceLogic.minus$(Space.scala:78)
at dotty.tools.dotc.transform.patmat.SpaceEngine.minus(Space.scala:323)
at dotty.tools.dotc.transform.patmat.SpaceLogic.minus$$anonfun$2(Space.scala:256)
at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:169)
at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:165)
at scala.collection.immutable.List.foldLeft(List.scala:79)
at dotty.tools.dotc.transform.patmat.SpaceLogic.minus(Space.scala:256)
at dotty.tools.dotc.transform.patmat.SpaceLogic.minus$(Space.scala:78)
at dotty.tools.dotc.transform.patmat.SpaceEngine.minus(Space.scala:323)
at dotty.tools.dotc.transform.patmat.SpaceEngine.checkExhaustivity(Space.scala:840)
at dotty.tools.dotc.transform.PatternMatcher.transformMatch(PatternMatcher.scala:45)
at dotty.tools.dotc.transform.MegaPhase.goMatch(MegaPhase.scala:779)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:369)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:429)
at dotty.tools.dotc.transform.MegaPhase.mapDefDef$1(MegaPhase.scala:249)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:252)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformStat$2(MegaPhase.scala:437)
at dotty.tools.dotc.transform.MegaPhase.recur$1(MegaPhase.scala:442)
at dotty.tools.dotc.transform.MegaPhase.recur$1(MegaPhase.scala:442)
at dotty.tools.dotc.transform.MegaPhase.recur$1(MegaPhase.scala:442)
at dotty.tools.dotc.transform.MegaPhase.recur$1(MegaPhase.scala:442)
at dotty.tools.dotc.transform.MegaPhase.recur$1(MegaPhase.scala:442)
at dotty.tools.dotc.transform.MegaPhase.transformStats(MegaPhase.scala:442)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:362)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:429)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:256)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformStat$2(MegaPhase.scala:437)
at dotty.tools.dotc.transform.MegaPhase.recur$1(MegaPhase.scala:442)
at dotty.tools.dotc.transform.MegaPhase.transformStats(MegaPhase.scala:442)
at dotty.tools.dotc.transform.MegaPhase.mapPackage$1(MegaPhase.scala:382)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:385)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:429)
at dotty.tools.dotc.transform.MegaPhase.transformUnit(MegaPhase.scala:448)
at dotty.tools.dotc.transform.MegaPhase.run(MegaPhase.scala:460)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:303)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:304)
at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:205)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
at dotty.tools.dotc.Run.runPhases$5(Run.scala:215)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:223)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
at dotty.tools.dotc.Run.compileUnits(Run.scala:230)
at dotty.tools.dotc.Run.compileSources(Run.scala:166)
at dotty.tools.dotc.Run.compile(Run.scala:150)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
at dotty.tools.dotc.Driver.process(Driver.scala:199)
at dotty.tools.dotc.Driver.process(Driver.scala:167)
at dotty.tools.dotc.Driver.process(Driver.scala:179)
at dotty.tools.dotc.Driver.main(Driver.scala:209)
at dotty.tools.dotc.Main.main(Main.scala)