Detect static default interface methods in illink#96821
Conversation
|
Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer, @joperezr, @marek-safar Issue DetailsFixes #96516. The issue was that we were skipping the TypeMapInfo logic that would have been needed to discover static default interface implementations. While investigating this I noticed more problems in this area (I will file bugs) that I plan to fix separately. For example, the current logic only works for instantiated types, so if you replace
|
There was a problem hiding this comment.
Better mark too many methods than too few methods. LGTM.
I double checked that my advice to add the IsStatic check in #93662 did not in fact cause this regression bug - the previous IsNewSlot check was already filtering statics on its own since Roslyn doesn't mark static virtuals newslot. That PR is scheduled for servicing so it would by annoying if it was a regression.
...Cases/Inheritance.Interfaces/DefaultInterfaceMethods/StaticDefaultInterfaceMethodOnStruct.cs
Outdated
Show resolved
Hide resolved
...Cases/Inheritance.Interfaces/DefaultInterfaceMethods/StaticDefaultInterfaceMethodOnStruct.cs
Outdated
Show resolved
Hide resolved
* Detect static default interface methods in illink
Fixes #96516. The issue was that we were skipping the TypeMapInfo logic that would have been needed to discover static default interface implementations.
While investigating this I noticed more problems in this area (I will file bugs) that I plan to fix separately. For example, the current logic only works for instantiated types, so if you replace
struct Derivedin this testcase with a class, it fails.