controlflow / resharper-heapview

ReSharper Heap Allocations Viewer plugin
MIT License
303 stars 28 forks source link

Not-implemented default interface method can produce boxing when used #85

Closed controlflow closed 1 year ago

controlflow commented 3 years ago
void M<T>(T t) where T : struct, I {
  t.Default(); // possible boxing allocation
}

interface I {
  void Default() { }
}

struct S : I { }

https://twitter.com/xoofx/status/1410832325882023939