Skip to content
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

perform sourceExpr translation on match-bang expressions #9407

Merged
merged 2 commits into from Jun 11, 2020

Conversation

baronfel
Copy link
Member

@baronfel baronfel commented Jun 8, 2020

This fixes #9406 by introducing sourceExpr rewriting for match! expressions.

I tested this locally using dotnet run -f netcoreapp3.0 -- --langversion:preview /Users/chethusk/oss/scratch/match.fsx from the FSI directory and using the same failing fsx file from the issue report. I could use advice on how/where to add tests for this though. I imagine we'd need a miniature CE in the test suite to trigger this instead of bringing in an entire dependency.

@baronfel baronfel marked this pull request as ready for review June 9, 2020 20:46
@baronfel baronfel force-pushed the matchbang-source-translation branch 2 times, most recently from 4ff5da5 to 07c7397 Compare June 10, 2020 15:52
@baronfel
Copy link
Member Author

Alright, this new test is green as well, so this one's ready for review too.

Copy link
Contributor

@cartermp cartermp left a comment

Choose a reason for hiding this comment

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

Looks good!

@KevinRansom
Copy link
Member

@baronfel would you resolve the conflicts mate.

Thanks

KEvin

@baronfel baronfel force-pushed the matchbang-source-translation branch from 07c7397 to 13edf85 Compare June 11, 2020 14:54
@baronfel
Copy link
Member Author

Ok, let's see if I factored out the tests correctly without typoing anything 🤞

@cartermp
Copy link
Contributor

Thanks m8

@cartermp cartermp merged commit e512a15 into dotnet:master Jun 11, 2020
@baronfel baronfel deleted the matchbang-source-translation branch June 11, 2020 21:01
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
* perform sourceExpr translation on match-bang expressions

* add test for match-bang source translations
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! matched expressions are not subject to Source-expression translation like let! and others
3 participants