-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
izumi.reflect.Tag subtype relationship is not faithful to compiled ones.
Here is a minimal repro (Scala 2 syntax to allow testing various versions):
import izumi.reflect.Tag
trait A {
type T
}
trait AInt extends A {
override type T = Int
}
object App extends App {
implicitly[AInt <:< A { type T = Int }] // true
println(Tag[AInt].tag <:< Tag[A { type T = Int }].tag) // false
}
It might be more efficient to tackle this issue and #469 both at once, but they seemed different enough to me to warrant different posts.
It might help to know that the issue is not present for Scala >= 3.2 and izumi-reflect =< 2.2.5. But the issue is present if violating any of these bounds (Scala 2 and/or izumi-reflect >= 2.3.0).
I will report soon the corresponding issue on the ZIO repo.