-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Populate switch tweaks #10846
Populate switch tweaks #10846
Conversation
Why did you PR to Future instead of Master? My PR was merged into Master, so shouldn't it be corrected there and be auto-PR'ed to Future? |
Because IOperatoin has been disabled in Master :) |
@dotnet-bot retest prtest/lin/dbg/unit32 please |
OK. I hope this gets worked in before it is released: it is quite an improvement over my first version. |
We're discussing what to do. :) |
@dotnet/roslyn-ide please review. |
We've decided we're going to do all the work here out of 'future'. We'll be disabling this in master and shipping this out of future (with IOperations) instead. Thanks! |
👍 |
tagging @dotnet/roslyn-ide For signoff. |
…g a default case.
a60e65f
to
772fdf9
Compare
test vsi please |
👍 |
retest this please |
retest vsi please |
adding @mattwar for |
change looks righteous though 👍 |
what are the missing tokens for? |
So that if you add switch sections to This enables someone to easily just do: |
in case you are operating on a code fragment? I see, since you've only just typed the first part and you want to auto generate the cases? Couldn't you just add the token directly without the rewriter? |
I haven't tried this, but you could probably just do |
I could... but then i'd have to write logic specifically to handle the open and close tokens being missing. I just decided i would write the helper once and then would have it whenver i needed it. |
'Block' won't generate the write type of node for a switch statement unfortunately. |
test vsi please |
test vsi please |
This change tweaks 'Populate Switch' to provide from 1-3 fixes to the user depending on the state of the switch. The potential fixes provided are:
Add missing cases.
Add missing 'default' case
Add both