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
In Scala 2.13 all generic param types of HKT (both covariant and invariant) are transformed into wildcard types.
In 3.3.4-RC1 / 3.5.0 contravariant types are preserved but erased.
In 3.3.3- both contravariant and covariant types were preserved and not erased
The bisect shows that behaviour between 3.5.0 and 3.3.3 changed in #19931
The change in typer led to a change in generic signatures emitted by the backend.
The current generic signature for covariant HKT is incorrect (LSubFlowDef<LFlow2;>) and is invalid, it should be never emitted. We need to either restore old behaviour or emit wildcard types instead.
It means that both 3.5.0 and 3.5.1 releases are producing invalid generic signatures. We should fix in the next release
The PR introducing the change to LTS was reverted (#21609)
Based on apache/pekko#1474
In Scala 2.13 all generic param types of HKT (both covariant and invariant) are transformed into wildcard types.
In 3.3.4-RC1 / 3.5.0 contravariant types are preserved but erased.
In 3.3.3- both contravariant and covariant types were preserved and not erased
Compiler version
3.3.4 / 3.5.0
Minimized code
Output
Based on javap outputs
Signatures:
Scala 3.3.4-RC1 / 3.5.0
Scala 2.13
Scala 3.3.3
Expectation
Probably both covariant and contravaraint types should have been replaced with wildcard types in generic signatures
The text was updated successfully, but these errors were encountered: