Files
ILSpy/ICSharpCode.ILSpyX/Analyzers
Siegfried Pammer 7572b57eee Fix #2372: report a field's address loads on their own
Loading a field's address was counted as both a read and a write, so a
use that only reads - calling a method on a value-type field emits
ldflda and writes nothing - was listed under "Assigned By".

An address load says only that something needed a reference to the
field. What happens through that reference is up to the consumer, and
the IL scan here does not look at it, so the load is neither a read nor
a write and gets a category of its own. Special-casing the methods known
not to mutate their receiver would answer this one screenshot and leave
every ref argument still guessing.

Assisted-by: Claude:claude-opus-5:Claude Code
2026-09-07 23:00:53 +02:00
..