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
I recently learned that in Scala 2 @uncheckedVariance can be used on any type to prevent the variance check from descending deeper. But it feels more natural to associate the annotation with the type parameter. However that would not be backwards compatible.
Uh oh!
There was an error while loading. Please reload this page.
We could drop
@uncheckedVariance
in asSeenFrom but that breaks overrides which rely on the inferred type coming from the overridden definition containing the annotation, for example https://github.com/lampepfl/dotty/blob/9450bf2c9725c3616743e9617844e6c55c86c67a/tests/run/CollectionTests.scala#L168Maybe we can drop them when inferring a result type (that does not come from overriding something), in the same way we drop skolems: https://github.com/lampepfl/dotty/blob/9450bf2c9725c3616743e9617844e6c55c86c67a/compiler/src/dotty/tools/dotc/typer/Namer.scala#L1463 but that doesn't help with chained expressions
The text was updated successfully, but these errors were encountered: