Skip to content

Conversation

@felher
Copy link
Contributor

@felher felher commented Sep 4, 2020

I think the part about match types supporting variables within the pattern is no longer a difference. Typescript supports binding of variables within the pattern. I've written up a small example:

https://www.typescriptlang.org/play?#code/C4TwDgpgBAogNhAthAdsA8gMwDwA0B8UAvFAFBQVS5QQAewqAJgM5QAUAliphAE6wBKANoBdKAH5YUAFzlK1OgxQsoAbyEBrCCGlRmwXlwDmI3Z259BAXwlTdKCADc+AblKkAxgHsU+mgEZdeCRUDBwUAFdEACM+UUISAGY3b19gGgAmIIRkNCxsdS0dPQNjUxLDFCMrBKgAIkwvLzqUnz8IROyQvJx9SqN44ihkoA

Is the difference outdated or am I just misunderstanding what "Match types can bind variables in type patterns" means?

Typescript supports binding of variables within the pattern
Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

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

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Thanks for the information!

@smarter smarter merged commit 349f553 into scala:master Sep 4, 2020
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