mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
PatternStatementTransform renamed backing-field identifiers to the event after the fact, keyed on the metadata name association alone: references belonging to an event that is not actually automatic were still renamed, binding them to a custom event that is unusable as a value (the same defect class as #3858), and the rename bypassed the resolver checks, so qualifiers were computed for the hidden field instead of the printed event. ExpressionBuilder.ConvertField now performs the substitution, keyed on the AutoEventDecompiler verdict whose memo moves into DecompileRun so that member hiding, the event declaration, and reference translation all decide from one analysis. Checking the verdict's field identity also keeps same-typed sibling events apart (#3575), and the qualifier logic running against the event drops spurious this./type qualifiers from raise sites. mcs 2.x accesses a sibling automatic event's backing field directly inside custom accessors instead of calling the accessor, so the fixture expects the resulting Delegate.Combine form there. Assisted-by: Claude:claude-fable-5:Claude Code Claude-Session: https://claude.ai/code/session_01Btdypgm8utyxqt1Etn2BDipull/3889/head
7 changed files with 105 additions and 55 deletions
Loading…
Reference in new issue