fthomas / fthomas/refined

Do something about warning with -Xverify

Open
#418 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
1.7k
Forks
152
Avg merge
1h 20m
Merged PRs (30d)
6

Description

@mdimjasevic and @liff [mentioned on Gitter](https://gitter.im/fthomas/refined?at=5a699a1aae53c15903311d45) 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:
```scala
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.