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
I guess the reason for having PropertyValueSet.fromStringOrError() is that we can parse a string wihtout causing exceptions. However the typing now only allows the return value of PropertyValueSet which means that the onError function must return PropertyValueSet and thus is is not possible to know from the result if the string did parse or not since the return value is always a valid PropertyValueSet even when the parsing fails.
I guess the reason for having
PropertyValueSet.fromStringOrError()
is that we can parse a string wihtout causing exceptions. However the typing now only allows the return value of PropertyValueSet which means that theonError
function must returnPropertyValueSet
and thus is is not possible to know from the result if the string did parse or not since the return value is always a valid PropertyValueSet even when the parsing fails.For example this code does not compile:
The text was updated successfully, but these errors were encountered: