You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code is trying to ensure that if an explicit interface implementation method was marked, the appropriate member of the interface list is also preserved.
The code falls victim to Cecil's behavior where the act of resolving a TypeRef/MethodRef strips away the genericness information.
Will end up preserving the first IFoo entry in the interface list, irrespective of whether IFoo<object>.Frob or IFoo<string>.Frob was the one responsible for MarkExplicitInterfaceImplementation getting called.
I think this is low impact, since we can only get there if the explicit impl was rooted through ILLinkTrim, but ILLinkTrim was the motivating factor why MarkExplicitInterfaceImplementation was added in the first place, so YMMV.
Found while investigating #1421. This issue gives the other issue a more weird failure mode.
The text was updated successfully, but these errors were encountered:
That looks like a different thing. Linker rolls its own override resolution logic and doesn't call into Cecil for this.
What I'm referring to is a fundamental design choice in Cecil and not a bugfix thing - it would break a lot of existing code based on Cecil. CCI has resolution logic that IMHO works better and doesn't come with this property/trap.
https://github.com/mono/linker/blob/9e3191cad279e945a4e2c99340454959fec637b0/src/linker/Linker.Steps/MarkStep.cs#L2469-L2492
This code is trying to ensure that if an explicit interface implementation method was marked, the appropriate member of the interface list is also preserved.
The code falls victim to Cecil's behavior where the act of resolving a TypeRef/MethodRef strips away the genericness information.
As a result, for code like this:
Will end up preserving the first IFoo entry in the interface list, irrespective of whether
IFoo<object>.Frob
orIFoo<string>.Frob
was the one responsible forMarkExplicitInterfaceImplementation
getting called.I think this is low impact, since we can only get there if the explicit impl was rooted through ILLinkTrim, but ILLinkTrim was the motivating factor why
MarkExplicitInterfaceImplementation
was added in the first place, so YMMV.Found while investigating #1421. This issue gives the other issue a more weird failure mode.
The text was updated successfully, but these errors were encountered: