[8.3.90.1947] Failed to use mapped class to System.WeakReference on .NET/UWP

static class Program
{
    public Int32 Main(string[] args)
    {
        var a = new object();

        // OK
        var r1 = new System.WeakReference<object>(a);

        // passed on 8.3.90.1927
        // crashed for Exception on 8.3.90.1947:
        // GenericArguments[0], 'T', on 'System.WeakReference`1[T]' violates the constraint of type parameter 'T'.
        var r2 = new WeakRef<object>(a);
    }
}

public __mapped class WeakRef<T> => System.WeakReference<T>{
    public WeakRef(T v) {
        return new System.WeakReference<T>(v);
    }
}

Thanks, logged as bugs://74568

For now: add where T: class to the weakref. Looks like somehow it didn’t fail on that, even though it should.

bugs://74568 got closed with status fixed.