Return type in closure? #6865
-
Support questionI have question, is there a rule I can set so an closures have return type. Now I have to set return types by my self. I am curious if there is a rule that I can set. If not, will this be implemented?
|
Beta Was this translation helpful? Give feedback.
Answered by
Wirone
Apr 5, 2023
Replies: 1 comment 2 replies
-
From what you provided as an example it's not clear what is the current and expected behavior. Are you talking about |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's
void_return
fixer that you might check, but as the name suggests it will only handlevoid
return type. I believe we don't have fixer that would infer return type from the function's body and would use it as return type in the signature. Feel free to create feature request, but please have in mind that core team not necessarily will work on it because of other ongoing works.