Closed j-mie6 closed 11 months ago
When something is fixed in 2.13, we don't keep the ticket open. So I'm closing, but note regardless that:
Despite our best intentions, closing a ticket is sometimes taken as a slap in the face, as we saw on e.g. #11259. I assure you that's not our intention.
Not sure what 2.13.2 PR fixed this, but the "Compiler fixes" section of https://github.com/scala/scala/releases/tag/v2.13.2 has a couple of obvious candidates
Despite our best intentions, closing a ticket is sometimes taken as a slap in the face, as we saw on e.g. #11259. I assure you that's not our intention.
My face is positively unslapped 🙂
Do I understand correctly that you verified that it fails on 2.13.1 and not 2.13.2?
In which case, I might try and backport it myself some time in the distant future
Do I understand correctly that you verified that it fails on 2.13.1 and not 2.13.2?
yeah. scala-cli is great for this sort of testing (scala-cli -S 2.13.1
)
Awesome. I assume I can publishLocal
a snapshot of the scala compiler or something if I wanted to test each PR in turn at some point?
Every merged PR has a corresponding nightly build, not on Maven Central, but on https://scala-ci.typesafe.com/artifactory/scala-integration/ — where scala-cli will look by default if you ask for a version number such as scala-cli -S 2.13.2-bin-1bde691
(which is the nightly corresponding to scala/scala#8651). So it's relatively easy to git bisect
in the scala/scala repo — you just git bisect skip
whenever it suggests a commit other than a PR merge commit.
Ok amazing, thanks ❤️
Hopefully when I'm free of my PhD restraints I can try and hunt this down!
PhD restraints
are you getting a PhD or a BD?
Definitely PhD @som-snytt 😛
Reproduction steps
Scala version: 2.12.18
Problem
In Scala 2.13.11 and Scala 3.3.0, this code compiles entirely fine. In Scala 2.12 however, it reports the following errors:
Both of these are incorrectly assuming the variance is mismatched, but this is not the case, and adding a covariance annotation as in
InvKCo
does not help either.There is a workaround, which is to use
@uncheckedVariance
.(thanks @s5bug for the minimisation :slightly_smiling_face:)