Any idea what is going on here? Why is the refere...
# dotnet
t
Any idea what is going on here? Why is the reference after the
Output.Create
possibly null?
Copy code
private void DoSomething(ResourceGroup resourceGroup)
{
    var test = resourceGroup.Name;  // No null warning
    var output = Output.Create(resourceGroup);
    var test2 = resourceGroup.Name; // Possible null reference warning
}
t
t
Hmmm... Why are we attributing it with
MaybeNull
? I'm reading this as "even though I'm passing in a non-null value, a null value may be returned". Why isn't this sufficient?
Copy code
public static Output<T> Create<T>(T value) => Create(Task.FromResult(value));