-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Match type subtyping wrongly instantiates types in patterns #9107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 4, 2020
Because of `caseLambda = constrained(cas)` in `def matchCase`, subtyping wrongly things that it's OK to further constrain types introduced in match type patterns. This commit fixes the issue with a stronger version of `inFrozenConstraint` around match type reduction.
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 4, 2020
Because of `caseLambda = constrained(cas)` in `def matchCase`, subtyping wrongly things that it's OK to further constrain types introduced in match type patterns. This commit fixes the issue with a stronger version of `inFrozenConstraint` around match type reduction.
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 24, 2020
Because of `caseLambda = constrained(cas)` in `def matchCase`, subtyping wrongly things that it's OK to further constrain types introduced in match type patterns. This commit fixes the issue with a stronger version of `inFrozenConstraint` around match type reduction.
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Apr 23, 2021
Because of `caseLambda = constrained(cas)` in `def matchCase`, subtyping wrongly things that it's OK to further constrain types introduced in match type patterns. This commit fixes the issue with a stronger version of `inFrozenConstraint` around match type reduction.
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Apr 26, 2021
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Apr 29, 2021
Because of `caseLambda = constrained(cas)` in `def matchCase`, subtyping wrongly things that it's OK to further constrain types introduced in match type patterns. This commit fixes the issue with a stronger version of `inFrozenConstraint` around match type reduction.
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Apr 30, 2021
Because of `caseLambda = constrained(cas)` in `def matchCase`, subtyping wrongly things that it's OK to further constrain types introduced in match type patterns. This commit fixes the issue with a stronger version of `inFrozenConstraint` around match type reduction.
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
May 4, 2021
odersky
pushed a commit
to dotty-staging/dotty
that referenced
this issue
May 4, 2021
neko-kai
pushed a commit
to 7mind/dotty
that referenced
this issue
May 5, 2021
michelou
pushed a commit
to michelou/scala3
that referenced
this issue
May 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is something off with match type subtyping:
The issue seams to be really match type related, as the following minimization attempt is correctly rejected:
The text was updated successfully, but these errors were encountered: