Repository navigation
fix: suppress secondary switch diagnostics - W-24797835 - #831
Open
peternhale wants to merge 1 commit into
Open
peternhale wants to merge 1 commit into
peternhale wants to merge 1 commit into
Conversation
Contributor
E2E Test Results SummaryRun: 2196 No test results found Searched for Specs With No ResultsThe following specs did not produce test results. This usually means the job crashed before tests ran (e.g. build failure, infra error, dependency download timeout).
ArtifactsView detailed test reports in the Artifacts section. |
peternhale
requested review from
jonnyhork
and removed request for
mingxuanzhangsfdx
November 13, 2026 15:05
peternhale
force-pushed
the
ph/W-24797835-suppress-secondary-switch-diagnostics
branch
from
November 13, 2026 17:07
86695ca to
3c68365
Compare
|
@peternhale The error suppression looks right in these QA checks:
The screenshot shows the duplicate-literal case after analysis finishes. I briefly saw the duplicate-branch diagnostic before type resolution completed, then it changed to the primary unsupported-expression error. The two things that may need another look are on #830. |
peternhale
force-pushed
the
ph/W-24797835-suppress-secondary-switch-diagnostics
branch
from
November 13, 2026 20:45
3c68365 to
4097ad4
Compare
Contributor
E2E Test Results SummaryRun: 2209 Test Results
Passing Rate by File
ArtifactsView detailed test reports in the Artifacts section. Some tests failed |
peternhale
force-pushed
the
ph/W-24797835-suppress-secondary-switch-diagnostics
branch
2 times, most recently
from
November 16, 2026 18:25
cc86118 to
bf1805d
Compare
jonnyhork
approved these changes
Nov 16, 2026
peternhale
force-pushed
the
ph/W-24797835-suppress-secondary-switch-diagnostics
branch
from
November 17, 2026 15:44
bf1805d to
ec9ddb0
Compare
peternhale
force-pushed
the
ph/W-24797835-suppress-secondary-switch-diagnostics
branch
from
November 18, 2026 13:35
ec9ddb0 to
1739cec
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Aligns switch diagnostics with Jorje when the switch expression has a known unsupported type.
ILLEGAL_SWITCH_EXPRESSION_TYPEdiagnostic as soon as the switch expression is classified as unsupported.What issues does this PR fix or reference?
@W-24797835@
Test Plan
ILLEGAL_SWITCH_EXPRESSION_TYPEfor:when Type variableclauseswhenclauseswhenclausespnpm --filter @salesforce/apex-lsp-parser-ast run lintpnpm exec vitest run packages/apex-parser-ast/test/semantics/validation/validators/SwitchStatementValidator.test.ts --reporter=defaultpnpm --filter @salesforce/apex-lsp-parser-ast run testStack created with GitHub Stacks CLI • Give Feedback 💬