Files
ILSpy/ICSharpCode.Decompiler
Siegfried Pammer 4a0918cbe5 Look past comment placeholders when matching statement sequences
The decompiler emits comments - //IL_ warnings, "Could not convert
BlockContainer", "try-fault", a Nop's comment - as an EmptyStatement in the
middle of a statement sequence. Every transform that walks such a sequence
then stops recognizing its pattern the moment one of those lands in it:
constructor initializers stay in the body, `using var` and `for` are not
introduced, and a finalizer keeps its `override Finalize` shape, which does
not compile at all.

The destructor matcher moves the placeholders it skipped into the body that
replaces the old one, so the warning that caused the problem is not dropped
along with the statement carrying it.

Assisted-by: Claude:claude-opus-5:Claude Code
2026-09-10 20:01:19 +02:00
..
2025-12-29 19:24:31 +01:00
2026-09-06 15:24:23 +02:00
2026-09-05 12:51:44 +02:00