Open
Description
Implement support for static interface methods (csharp design: dotnet/csharplang#4436)
Known issues for .NET 7
- Disabled runtime tests
runtime/src/tests/issues.targets
Lines 1532 to 1537 in 6f30425
- Triage and create individual issues
-
GenericContext
[mono] Fix static virtual calls to generic methods from gshared code #66739 -
InterfaceVariance
-
NegativeTestCases
- [mono] Default Interface Implementation of Static Virtual Methods #67540
- [iOS][tvOS] Generic math IntPtr SByte and Int16 test failures #61920
- [mini] gshared: Implement static virtual method
constrained.ldftn
in the JIT #61672 - support AOT with generic sharing [mono][aot] Static virtual interface methods do not work with generic sharing #54910
- generic sharing failure with
contstrained.call
[mono][fullaot] Calling static virtual method from a generic method leads to "Attempting to JIT" error #65002 and Use generic math in System.Numerics.Vectors (#60365) #60905 - [mini] gshared static virtual methods: asserts !sig->has_type_parameters #65394
- [mono] gshared calls to non-generic static virtual interface method throw BadImageFormatException: Method has no body #65384
- Generic math does not work in WASM AOT #60447
Work items completed in .net 6:
- metadata updates
- allow
virtual
onstatic
methods in interfaces (can borrow this and JIT from partydonk prototype) - implement implements-all-static-interface-methods-of relation
- possibly implement a static vtable for
MonoClass
(partydonk just puts static methods into the instance vtable and also does matching by name)
- allow
- unconditionally enable JIT support
-
constrained.call
-
- unconditionally enable interpreter support
-
constrained.call
-
constrained.ldftn
-
- support for the
RuntimeFeature
flag System.Runtime.CompilerServices.RuntimeFeature.VirtualStaticsInInterfaces #49905 for statics in interfaces.
Related CoreCLR work items over at #50129