Skip to content

Fix #8600: Match trough type ascription #8684

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

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki self-assigned this Apr 7, 2020
@nicolasstucki nicolasstucki linked an issue Apr 7, 2020 that may be closed by this pull request
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM

case (Typed(expr1, tpt1), Typed(expr2, tpt2)) =>
expr1 =?= expr2 && tpt1 =?= tpt2
case (Typed(expr1, _), pattern) =>
expr1 =?= pattern
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means there is no way to match against a typed expression. It's fine in practice. As this is a design choice, it's better to add a small doc here, and add a link to the relevant issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be added to the docs in #8687. These do not exist yet.

@nicolasstucki nicolasstucki merged commit e31f142 into scala:master Apr 8, 2020
@nicolasstucki nicolasstucki deleted the fix-#8600 branch April 8, 2020 12:28
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.

Match fails using quasiquotes
2 participants