Closed
Description
minimized code
type Foo[A <: Int with Singleton] = AnyRef
def bar[A <: Int with Singleton](foo: Foo[A])(implicit v: ValueOf[A]): Int = v.value
val res = bar((???): Foo[10])
If the type parameter is used in some way on the right of the alias, then it won't be replaced with Nothing.
expectation
Compiles, like it does with Scala 2
The type is handed to the compiler on a silver plater. While I understand type aliases can be unstable, I'd assume they wouldn't be this unstable.