SharpLab icon indicating copy to clipboard operation
SharpLab copied to clipboard

Please update main branch (stopped at 11 Jun 2024)

Open jnm2 opened this issue 5 months ago • 0 comments

error CS9240: Target runtime doesn't support by-ref-like generics.

using System;

void M<T>(T disposable) where T : IDisposable, allows ref struct
{
    disposable.Dispose();
}

https://sharplab.io/#v2:EYLgtghglgdgNAFxANwKYCcoDMCeAfAAQCYBGAWAChKCAWAAgFkAeAFQD4AKFugEygGcADgHt+EYABtUASjoB3ABYZUdbiDoBJACICRYyajh0IEicLn866VFjr8E6AK4BjBJQDelOt967R4qQA6HSFRVA5pAG5KAF8gA

jnm2 avatar Sep 03 '24 18:09 jnm2