Open
Description
OK, I'm not clear what is supposed to happen here, and if this is a bug that I accidentally treated as a feature or it's supposed to work. Under 3.3.0 (LTS) this code compiles successfully, BUT I just noticed that if everything is in the same file and not across modules, then it does not.
Compiler version
Last good release: 3.4.0-RC1-bin-20230818-932c10d-NIGHTLY
First bad release: 3.4.0-RC1-bin-20230821-6e370a9-NIGHTLY
First bad commit: 34dbdd8
Regression from #18398
Minimized code
UBMatch.scala
type <:![T <: UB, UB] <: UB = T match
case UB => T
UBMatch.test.scala
//> using test.dep org.scalameta::munit::0.7.29
trait Foo
type Of[T] <: Foo = T match
case Foo => T <:! Foo
Output
4 | case Foo => T <:! Foo
| ^^^^^^^^^
| Found: T <:! Foo
| Required: Foo
Expectation
Should compile (not completely sure, see comment on the head of the issue)
Edit: Should not compile (see discussion)