Skip to content

Disallow some opaque type aliases in match type patterns#20913

Draft
odersky wants to merge 2 commits intoscala:mainfrom
dotty-staging:change-opaque-matchtypes-1
Draft

Disallow some opaque type aliases in match type patterns#20913
odersky wants to merge 2 commits intoscala:mainfrom
dotty-staging:change-opaque-matchtypes-1

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jul 1, 2024

Disallow opaque type aliases in match type patterns in scopes where the alias is visible.

@odersky
Copy link
Contributor Author

odersky commented Jul 2, 2024

This should give some protection against using opaque types in match type patterns improperly.

@odersky odersky marked this pull request as draft August 1, 2024 12:21
@odersky odersky force-pushed the change-opaque-matchtypes-1 branch from fa8d00b to 07ac3ed Compare February 16, 2025 10:16
@odersky odersky force-pushed the change-opaque-matchtypes-1 branch from 07ac3ed to 4d71bb4 Compare February 16, 2025 10:19
@odersky
Copy link
Contributor Author

odersky commented Feb 16, 2025

This was a left-over from last summer's named tuple work.

@odersky odersky marked this pull request as ready for review February 16, 2025 10:20
Disallow opaque type aliases in match type patterns in scopes where the alias is visible.
@Gedochao
Copy link
Contributor

Rebased on the latest main.
@odersky is this still relevant? should we try to re-review?

@Gedochao Gedochao added the stat: stale PR Marks any stale PRs, if no response is given, the PR qualifies as a one to close. label Feb 19, 2026
@odersky
Copy link
Contributor Author

odersky commented Feb 19, 2026

Yes, I think this is still relevant. We should try to get this in, since it prevents an unsoundness (which was encountered in a previous NamedTuple design).

@Gedochao
Copy link
Contributor

It seems tests are failing after rebase.
Converting to a draft, since it likely requires another look before re-review.

@Gedochao Gedochao marked this pull request as draft February 19, 2026 14:26
@Gedochao Gedochao removed the stat: stale PR Marks any stale PRs, if no response is given, the PR qualifies as a one to close. label Feb 19, 2026
@Gedochao Gedochao removed the request for review from EugeneFlesselle February 19, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments