mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
An assignment whose value is not one of the deconstruction's elements used to reject the whole match, so a custom deconstruction followed by any unrelated assignment stayed an explicit Deconstruct call. For a pattern rooted in a Deconstruct call the element list is fixed by the call's out-arguments, so such an assignment simply ends the pattern and stays after the deconstruct instruction. Tuple-rooted patterns keep rejecting: their element list is discovered from the assignments, so ending early would misread a suffix of the assignments as the whole pattern and fabricate discards for the elements before it. Assisted-by: Claude:claude-opus-5:Claude Codepull/3869/merge
2 changed files with 28 additions and 2 deletions
Loading…
Reference in new issue