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
{{ message }}
Repository navigation
Different error messages between async and regular functions #63277
The error message now says the '?' operator can only be used in a function that returns 'Result' or 'Option', which is totally unhelpful, since the function is (or at least should be) returning a Result, according to its signature.
It seems that, when dispatching error messages, the actual return types have precedence over signatures in async functions, but it's exactly the other way around in regular functions, which leads to kinda unexpected and confusing error messages.
Activity
Patryk27 commentedon Aug 5, 2019
For reference, it seems it's a duplicate of: #54326.
cramertj commentedon Aug 5, 2019
Closing as duplicate.