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

Fix #3382: Support compiler-generated throw-helper invocations in switch-expression implicit default-case. #3404

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

siegfriedpammer
Copy link
Member

Solution

  • Any comments on the approach taken, its consistency with surrounding code, etc.
  • Which part of this PR is most in need of attention/improvement?
  • At least one test covering the code changed

@@ -106,6 +106,7 @@ public static List<IILTransform> GetILTransforms()
new SwitchDetection(),
new SwitchOnStringTransform(),
new SwitchOnNullableTransform(),
new SwitchExpressionDefaultCaseTransform(),
Copy link
Member Author

Choose a reason for hiding this comment

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

I think that doing this as a post-processing transform of switch detection is a problem. At this point there is no separate block container for switch (BlockContainerKind.Switch is not yet set)... this transformation only happens later in LoopDetection. So this transform would have to perform all the validation that happens in the other switch detection transforms again.

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.

1 participant