scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
230 stars 21 forks source link

Type semilattice is broken in Scala 2.13.11 #12865

Closed tribbloid closed 4 months ago

tribbloid commented 9 months ago

Reproduction steps

Scala version: 2.13.11

object BoundError {

  trait Law

  class Topology[L <: Law]() {

    type Law_/\ = L

    implicitly[Law_/\ <:< Law]
  }

  class GraphBuilder[T <: Topology[?]](
      final val tp: T
  ) {

    type Law_/\ = tp.Law_/\

    implicitly[tp.Law_/\ <:< Law]
  }
}

Problem

Cannot compile

Can compile in Scala 3

SethTisue commented 4 months ago

see my remarks on https://github.com/scala/bug/issues/12952 about filing quality bug reports