Skip to content

ILLink fails to resolve method's base interface method if the interface method doesn't have newslot #93008

@vitek-karas

Description

@vitek-karas

This is based of a repro from F#. The interface definition of a method in F# looks like this:

.method public hidebysig specialname abstract virtual 
	instance valuetype MyLib.OS get_OS () cil managed 
{
} // end of method IPlatformData::get_OS

Note that it doesn't have a newslot flag.

Similar interface definition in C# looks basically the same except that it has newslot as well.

When illink resolves methods and their base methods, it will not consider interface methods which don't have newslot on them (I don't know why).

|| !resolvedInterfaceMethod.IsNewSlot)

As a result, implementing the above interface in C# and trimming the result will create the implementation type without any of the interface method implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Tools-ILLink.NET linker development as well as trimming analyzers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions