-
Notifications
You must be signed in to change notification settings - Fork 21
Description
In typelevel/squants#344 we face the following problem when compiling with 2.13 (2.10-2.12 work fine) - blocking squants to be released for 2.13:
[error] squants/shared/src/main/scala/squants/motion/Acceleration.scala:25:25: illegal cyclic reference involving class Velocity
[error] with TimeDerivative[Velocity]
Some work fixing such issues was already done in #11640, but even the integration builds of the compiler containing the fix (I used now 2.13.1-bin-d602ff4
) still fail to compile squants. If I add -Ybreak-cycles -Yrecursion 2147483647
compiler flags the error message changes a bit:
[error] squants/shared/src/main/scala/squants/motion/Velocity.scala:24:13: self constructor arguments cannot reference unconstructed `this`
[error] extends Quantity[Velocity]
Extracting a minimal example has not worked so far, even when extracting larger parts of the class hierarchy, so I can't provide more than a branch of squants to test for now: https://github.com/ybasket/squants/tree/scala-2.13
One possibility to investigate might be the alternative solution to #11640 proposed by @adriaanm in #11640 (comment).
Let me know if any more details are needed or there are things to be tried.