Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around limitation for JDK12+ about j.l.constant.Constable (#1941)
`java.lang.constant.Constable` was introduced at JDK12 and is a super trait of core boxed classes. This causes code like val seq = Seq(Double.box(1d), "") val elem = seq.head to infer types that mention `Constable`: `seq` is of type `Seq[Constable with ...]` and `elem` of type `Constable with ...`. The latter erases to `Constable`, which results in linking errors. It is unfortunately impossible to correctly implement `Constable` in Scala Native, because it requires reflection, so the general issue is not fixable. This commit works around the issue in our own test suite, by ascribing some values with explicit types, so that `Constable` does not appear in erased types.
- Loading branch information