Skip to content

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

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.

@siegfriedpammer siegfriedpammer marked this pull request as draft March 8, 2025 20:22
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