Allow reabstraction of default interface methods (#23313)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Mon, 8 Apr 2019 11:14:39 +0000 (13:14 +0200)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2019 11:14:39 +0000 (13:14 +0200)
commit24c92a5939002ecbadefbc5f93c2c8cc371d8b72
treee846057269d2774850af5baa75cb1b3edf7cf8aa
parent67e8c9ba99ea32339e2df59d9615a88851fa6dc7
Allow reabstraction of default interface methods (#23313)

Allow the runtime to load types with incomplete interface implementations. With this change, we allow (in pseudo-C#):

```csharp
interface IFoo { void Frob() { } }
interface IBar : IFoo { abstract void IFoo.Frob() }
class Fooer : IBar { }
```

Calling IFoo.Frob on an instance of `Fooer` will result in new exception being thrown because the default implementation of `IFoo.Frob` was re-abstracted by `IBar`.
13 files changed:
Documentation/design-docs/default-interface-methods.md
src/dlls/mscorrc/mscorrc.rc
src/dlls/mscorrc/resource.h
src/vm/methodtable.cpp
src/vm/methodtablebuilder.cpp
src/vm/runtimehandles.cpp
tests/src/Loader/classloader/DefaultInterfaceMethods/reabstraction/reabstraction.il [new file with mode: 0644]
tests/src/Loader/classloader/DefaultInterfaceMethods/reabstraction/reabstraction.ilproj [new file with mode: 0644]
tests/src/reflection/DefaultInterfaceMethods/Emit.cs
tests/src/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.cs
tests/src/reflection/DefaultInterfaceMethods/GetInterfaceMapProvider.il
tests/src/reflection/DefaultInterfaceMethods/InvokeConsumer.cs
tests/src/reflection/DefaultInterfaceMethods/InvokeProvider.il