runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Assert Failure: !"Cannot take the address of an uninstantiated generic method."

Open fadimounir opened this issue 10 years ago • 1 comments

Minimal repro:

internal interface IGen< T > { void Target< U >(); }

internal class GenInt : IGen< int > { public void Target< U >() { ... } public static void DelegateTest< U >() { IGen obj = new GenInt(); ThreadStart threadStart = new ThreadStart(obj.Target< U >); threadStart(); } }

And call GenInt.DelegateTest< string >() (or any instantiation using a reference type)

fadimounir avatar May 31 '16 19:05 fadimounir

Fixed with dotnet/coreclr#5347

fadimounir avatar Jun 01 '16 20:06 fadimounir