Open soronpo opened 1 year ago
First bad commit: 8aec1d11abc94f8695973380f7b740f4b76574bb
A minor change to the minimized example causes the issue to resurface. Here is the update minimized example (also pushed the update to https://github.com/soronpo/dottybug/tree/matchtypebug):
main/DFBits.scala
trait DFBits[W <: Int]
trait Candidate[R]:
type OutW <: Int
object Candidate:
given [W <: Int, R <: Foo[DFBits[W], VAL]]: Candidate[R] with
type OutW = W
main/Foo.scala
trait VAL
type Foo[T, M] = M match
case VAL => T
test/Test.scala
def baz[L](lhs: L)(using icL: Candidate[L]): DFBits[Int] = ???
object Test:
val x: DFBits[8] = ???
val z: DFBits[Int] = baz(x)
summon[Candidate[z.type]]
Fixing this issue depends on #20168, #20258, #20205, #20259, #20184, #20178, #20268
Fixing this issue depends on #20168, #20258, #20205, #20259 #20184, #20178
😮
This compilation error requires multi-module and multi-file to trigger.
Compiler version
Last good release:
3.3.2-RC1-bin-20230630-c629090-NIGHTLY
First bad release:3.3.2-RC1-bin-20230703-0a21ecf-NIGHTLY
Minimized code
See minimized project at: https://github.com/soronpo/dottybug/tree/matchtypebug
main/DFBits.scala
main/Foo.scala
test/Test.scala
Output
Expectation
No error.