Skip to content

LogPendingSubTypesThreshold influences subtyping  #5666

Closed
@OlivierBlanvillain

Description

@OlivierBlanvillain

The following example stop compiling when changing LogPendingSubTypesThreshold in Config.scala from 50 to 9:

sealed trait HList
trait HNil extends HList
trait HCons[+H, +T] extends HList

trait Concat[L1, L2] { type Out }
object Concat {
  implicit def i0[L]:
    Concat[HNil, L] { type Out = L } = null

  implicit def i1[H, T, L, O]
    (implicit c: Concat[T, L] { type Out = O }):
      Concat[HCons[H, T], L] { type Out = HCons[H, O] } = null
}

object Test {
  type L1 = HCons[Unit, HNil]

  implicitly[Concat[L1, L1]]
}

The simplest way to reproduce the issue it to change the settings inline, in TypeComparer.scala, as changes in Config.scala requires a full sbt clean to be picked up by zinc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions