Open matheussbernardo opened 5 months ago
Hello! I am wondering why only the second example warns. Is higher kinded-types messing with something here? Is this expected?
I don't think this is expected. We should investigate why this happens, thanks for reporting @matheussbernardo
same problem here with 3.4.1
i think
....collectFirst{ case c@XResolved[JobTitle.type](_, _) => c}
[warn] | ^
[warn] |the type test for ....XResolved[X.JobTitle.type]
[warn] | cannot be checked at runtime because its type arguments can't be determined from ....XResolved[X]
[warn] |
[warn] | longer explanation available when compiling with `-explain`
final case class XResolved[A <: X](
column: A,
id: String
)
case object JobTitle extends X
funny enough it still appears to work
Compiler version
scalac -version $ Scala compiler version 3.4.0 -- Copyright 2002-2024, LAMP/EPFL
Minimized example
Output Error/Warning message
Why this Error/Warning was not helpful
Hello! I am wondering why only the second example warns. Is higher kinded-types messing with something here? Is this expected?
Thanks in advance!