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
Found: (cf1 : Playground.Cov[Playground.F1])
Required:Playground.Cov[Playground.F2]
Explanation===========Tree: cf1
I tried to show that
(cf1 : Playground.Cov[Playground.F1])
conforms to
Playground.Cov[Playground.F2]
but none of the attempts shown below succeeded:
==> (cf1 : Playground.Cov[Playground.F1]) <:Playground.Cov[Playground.F2]
==>Playground.F1<:Playground.F2==>Playground.F1<: [x >:Playground.X<:Playground.Y] =>>Playground.Z[x]
==> [x >:Playground.A<:Playground.B] =>>Playground.C[x] <: [x >:Playground.X<:Playground.Y] =>>Playground.Z[x]
==>typebounds [ >:Playground.X<:Playground.Y] <:typebounds [ >:Playground.A<:Playground.B]
==>Playground.A<:Playground.X==>Any<:Playground.X=false==>Playground.Cov[Playground.F1] <:Playground.Cov[Playground.F2]
==>Playground.F1<:Playground.F2==>Playground.F1<: [x >:Playground.X<:Playground.Y] =>>Playground.Z[x]
==> [x >:Playground.A<:Playground.B] =>>Playground.C[x] <: [x >:Playground.X<:Playground.Y] =>>Playground.Z[x]
==>typebounds [ >:Playground.X<:Playground.Y] <:typebounds [ >:Playground.A<:Playground.B]
==>Playground.A<:Playground.X==>Any<:Playground.X=falseThe tests were made under the empty constraint
Expectation
The bounds >: A <: B are "tighter" than the bounds >: X <: Y. I would expect the subtyping check for the variance wrapper around the type functions to succeed.
The text was updated successfully, but these errors were encountered:
s5bug
changed the title
Subtype check succeeds as value, fails as AnyKind type parameter
Subtype check succeeds as value, fails as AnyKind type parameter for type functions with different but compatible bounds
Feb 3, 2025
s5bug
changed the title
Subtype check succeeds as value, fails as AnyKind type parameter for type functions with different but compatible bounds
Subtype check fails as AnyKind type parameter for type functions with different but compatible bounds
Feb 3, 2025
Compiler version
3.3.5
3.6.3
3.6.4-RC1
Minimized code
Output
Expectation
The bounds
>: A <: B
are "tighter" than the bounds>: X <: Y
. I would expect the subtyping check for the variance wrapper around the type functions to succeed.The text was updated successfully, but these errors were encountered: