Conversation
Twenty shapes that no fixture covered: nesting at depth three and at position zero, inner discards on either side, property and no-conversion targets, and deconstruction inside try, switch, if/else and while. All but one already decompile correctly - they are checked in so a future change to DeconstructionTransform cannot silently drop them. The one that does not is left commented out with a pointer to #4059 rather than as a red test: two back-to-back deconstructions share their out-slot temporaries, and neither is recognized. #4059 Assisted-by: Claude:claude-opus-5[1m]:Claude Code
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.
Tests only. Twenty deconstruction shapes that no fixture covered, so a future change to
DeconstructionTransformcannot drop them silently:try, inside aswitchcase, inif/else, and in awhileloopforeachover a listNineteen of them already decompile correctly. They are checked in as-is - this is regression
coverage for behaviour that works today, not a change in behaviour.
The twentieth
Two back-to-back deconstructions of the same source in one method are not recognized. Filed as
#4059 and checked in commented out with a pointer to it, the way
ArrayAssign_FloatToDoubleConversion_Customis already handled in this fixture, rather than leftas a red test.
csc reuses the same out-slot temporaries for both calls, so neither matches a transform that
expects the pattern to own its locals.
Provenance
These shapes come from an unpushed local branch that predates #3949 and #3950, the PRs that
actually fixed #3275 and #3388. Its fix is long superseded - both issues decompile correctly on
master, verified against that branch's own fixtures - but its test coverage never landed. This is
that coverage, ported and re-checked against the current implementation.
Verification
ICSharpCode.Decompiler.Tests: 3490 total, 0 failed, 45 skipped.DeconstructionTestsruns oneight compiler configurations (Roslyn 2.10, 3.11, 4.14 and latest, each with and without
Optimize); the failing case above failed on all eight before being commented out, so it is notcompiler-version specific.
Written by an AI agent (Claude) on Siegfried's behalf.