Skip to content

Claude/fix issue 1244 no blocks in switch cases#1248

Open
GrahamTheCoder wants to merge 3 commits intoicsharpcode:masterfrom
GrahamTheCoder:claude/fix-issue-1244-no-blocks-in-switch-cases
Open

Claude/fix issue 1244 no blocks in switch cases#1248
GrahamTheCoder wants to merge 3 commits intoicsharpcode:masterfrom
GrahamTheCoder:claude/fix-issue-1244-no-blocks-in-switch-cases

Conversation

@GrahamTheCoder
Copy link
Copy Markdown
Member

Fix #1244

claude added 2 commits April 13, 2026 22:35
…ctions

Only wrap switch case statements in a Block when a local variable
declaration is present. Otherwise emit statements directly, eliminating
the extra level of braces and indentation.

https://claude.ai/code/session_01AkwUvu3XuCdj3D4axoX4UX
…y braces in switch cases

Update all existing Select Case tests to reflect the new output format
(no block braces when no local variable is declared). Add two new tests:
one verifying no blocks are emitted for cases without local declarations,
and one verifying blocks are still emitted when local variables are present.

https://claude.ai/code/session_01AkwUvu3XuCdj3D4axoX4UX
@GrahamTheCoder GrahamTheCoder force-pushed the claude/fix-issue-1244-no-blocks-in-switch-cases branch from 9ef905c to 2fa30bf Compare April 13, 2026 22:35
…urn null, not return default

String is a reference type so Nothing converts to null (not default).
Confirmed by ParameterTests.cs:35 which has the same pattern.

https://claude.ai/code/session_01AkwUvu3XuCdj3D4axoX4UX
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.

VB -> C#: Avoid creating code blocks for each case when converting Select Case

2 participants