Commit e4000c8
committed
Enhance null handling in switch transformations
- Updated `Issue3421.cs`.
- Updated `MatchLegacySwitchOnStringWithDict` to check for `leaveContainer` and handle null sections accordingly.
- Introduced an overload for `AddNullSection` to accept `ILInstruction` as the body, improving flexibility.
- Modified existing `AddNullSection` to utilize the new overload, allowing for varied body types in `SwitchSection`.1 parent a1b3b14 commit e4000c8
File tree
2 files changed
+15
-5
lines changed- ICSharpCode.Decompiler.Tests/TestCases/ILPretty
- ICSharpCode.Decompiler/IL/Transforms
2 files changed
+15
-5
lines changedLines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
| |||
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
| 18 | + | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
678 | 685 | | |
679 | 686 | | |
680 | 687 | | |
| |||
741 | 748 | | |
742 | 749 | | |
743 | 750 | | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
744 | 756 | | |
745 | 757 | | |
746 | 758 | | |
| |||
753 | 765 | | |
754 | 766 | | |
755 | 767 | | |
756 | | - | |
| 768 | + | |
757 | 769 | | |
758 | 770 | | |
759 | 771 | | |
| |||
0 commit comments