refined
refined copied to clipboard
Do something about warning with -Xverify
@mdimjasevic and @liff mentioned on Gitter that scalac with the -Xverify
option issues warnings like these when using refined types:
[warn] /home/User/Product.scala:110: compiler bug: created invalid generic signature for value account Id in com.product.Product$Accounting
[warn] signature: J
[warn] if this is reproducible, please report bug at https://issues.scala-lang.org/
[warn] account Id: Long Refined Positive,
[warn] ^
More info can be obtained with -Ycheck:jvm
.
@liff also provided this minimal reproduction for this warning:
class Refined[A, B](val value: A) extends AnyVal
trait NonEmpty
case class Foo(x: String Refined NonEmpty)
We should check if we can fix this warning in the library, report that as scalac bug (if it is not already known), and maybe add this to the not yet existing FAQ.