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
Since .NET Core 3.0 ldftn opcode can't be used with interface methods (probably due to default implementations-related changes). Following code works on .NET Framework & .NET Core 2.x, but fails on .NET Core 3.0-3.1. Tested on Windows x64.
I made sure to preserve the legacy behavior in the original implementation of default interface methods (it was possible to keep it), but the C# compiler team requested that we do a conscious breaking change here. dotnet/coreclr#23032 was the breaking change. See the linked issue.
Support for the ldftn opcode in combination with an interface method and a null object parameter that was then passed to a delegate constructor was an extension to the ECMA 335 specification which the .NET runtime no longer supports. However, it is still possible to construct such delegates through reflection.
Since .NET Core 3.0 ldftn opcode can't be used with interface methods (probably due to default implementations-related changes). Following code works on .NET Framework & .NET Core 2.x, but fails on .NET Core 3.0-3.1. Tested on Windows x64.
Without manual code generation, this instruction could be obtained from C++/CLI compiler.
In this case,
BadImageFormatException
will be thrown fromA
static constructor.The text was updated successfully, but these errors were encountered: