mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 02:15:58 +00:00
Tuple element names and nullability are not part of a type's identity, so an interface resolved through one of its members carries neither. Naming an explicit implementation from that type produced `void I<(int, int)>.M()` on a type declared as `I<(int A, int B)>`, which the C# compiler rejects outright with CS0540 - the decompiled source did not build. The nullable case was already recorded as a TODO in the NullableRefTypes fixture, where the mismatch costs a CS8643 warning rather than an error. The implementing type's base-type list is the only place those annotations are recorded, so the qualifier is looked up there. Three call sites derived it independently - the AST builder for all five member kinds, the ambience used for tooltips and tree labels, and the forwarders synthesized for MethodImpls - so they now share one helper rather than repeating the rule twice more. Matching while ignoring tuple names and nullability cannot be ambiguous: implementing two interfaces that differ only in those is itself an error (CS8140, CS8645). Assisted-by: Claude:claude-opus-5[1m]:Claude Code