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
However, when the argument action is not a certain type, but a generic type with a constraint, only the latter works.
I'm not sure whether it is a bug but I believe these two functions should have the same behavior.
Bug Report
π Search Terms
CFA, destructure, discriminated union, generic
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
Here are two examples taken from #46266. Either of them works well.
However, when the argument
action
is not a certain type, but a generic type with a constraint, only the latter works.I'm not sure whether it is a bug but I believe these two functions should have the same behavior.
π Actual behavior
CFA fails in
_f10
π Expected behavior
No error.
The text was updated successfully, but these errors were encountered: