You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticErrorOr<Inspektionsvertrag?> TryCreateOrNull(int?freikilometer,int?freimonate){if(freimonate isnull or 0&& freikilometer isnull or 0){return(Inspektionsvertrag?)null;//this used to work}
...
now I get the Argument-Null-Exception. So in my Use-Case not having values at all is fine and should not be an error.
A second issue realted to the same topic is a method with the following signature
Hi Amichai,
prior to the change of disallowing nullables this code worked fine:
now I get the Argument-Null-Exception. So in my Use-Case not having values at all is fine and should not be an error.
A second issue realted to the same topic is a method with the following signature
prior to the change could be called with null as third parameter
this now also does a cast (although the whole errorOr<> is nullable, not only the T) and then throws null.
I would assume that being able to use nullables either on ErrorOr? or ErrorOr<T?> should be supported, but disallowing both is a bit too strict.
Hope my examples clarify my point. if not, please let me know
The text was updated successfully, but these errors were encountered: