The following code fails to produce a warning, even though it dereferences a possibly-null lvalue produced through __refvalue. This is caused by us discarding the nullable annotation when binding the type in Binder.BindRefValue.
#nullable enable
using System;
public class C {
public void M(TypedReference r) {
_ = __refvalue(r, string?).Length;
}
}
The following code fails to produce a warning, even though it dereferences a possibly-null lvalue produced through
__refvalue. This is caused by us discarding the nullable annotation when binding the type inBinder.BindRefValue.