[release/6.0] [mini] Don't add unbox tramopline on generic DIM calls (#58585)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 7 Sep 2021 17:35:56 +0000 (10:35 -0700)
committerGitHub <noreply@github.com>
Tue, 7 Sep 2021 17:35:56 +0000 (10:35 -0700)
commit89f7f7c53d899ce25d9a4fbf06e8848ac9295830
tree7cb5dba4fd5cc5b5291aca414ac064067fc0e60d
parenta99190cbcfe04e28d9c8962e5f62712f45e18729
[release/6.0] [mini] Don't add unbox tramopline on generic DIM calls (#58585)

* [mini] Don't add unbox tramopline on generic DIM calls

Don't unbox a valuetype `this` if the generic method is a DIM

Fixes https://github.com/dotnet/runtime/issues/58394

* Add regression test

Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
src/mono/mono/mini/mini-trampolines.c
src/tests/Loader/classloader/DefaultInterfaceMethods/regressions/github58394.cs [new file with mode: 0644]
src/tests/Loader/classloader/DefaultInterfaceMethods/regressions/github58394.csproj [new file with mode: 0644]