You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--Error: test.scala:4:29------------------------------------------------------4|finalcaseclassSourceShape[+T](valout:Outlet[T@uncheckedVariance])
|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^|covariant typeT occurs in invariant position in type [T] =>Outlet[T] of method copy$default$11 error found
Expectation
I expect it to compile like it does for Scala 2 (2.13.5).
Notes
I believe this doesn't happen in Scala 2 with scala/scala@fb38e47, which was addressing scala/bug#2382. Did that get removed with #9909? More recently #11704 also touched this, but that shipped in 3.0.0-RC2 and I originally saw this in 3.0.0-RC1. Either way, it looks like this is accidentally breaking compilation.
Btw, this comes from cross-compiling Akka Streams to Scala 3. Potentially this can be worked around by making un-casing the case classes, hand-writing all the boilerplate. For non-copy methods you can try overloading, though that becomes difficult when you have other default arguments (which is the case in Akka Streams)...
The text was updated successfully, but these errors were encountered:
Looks like that's what you're hitting here yeah, we strip @uncheckedVariance from the inferred types but it turns out we need it for the default getter inferred type.
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Apr 29, 2021
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
3.0.0-RC3
Minimized code
Output
Expectation
I expect it to compile like it does for Scala 2 (2.13.5).
Notes
I believe this doesn't happen in Scala 2 with scala/scala@fb38e47, which was addressing scala/bug#2382. Did that get removed with #9909? More recently #11704 also touched this, but that shipped in 3.0.0-RC2 and I originally saw this in 3.0.0-RC1. Either way, it looks like this is accidentally breaking compilation.
Btw, this comes from cross-compiling Akka Streams to Scala 3. Potentially this can be worked around by making un-casing the case classes, hand-writing all the boilerplate. For non-copy methods you can try overloading, though that becomes difficult when you have other default arguments (which is the case in Akka Streams)...
The text was updated successfully, but these errors were encountered: