-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add type annotations to entire function #1138
Add type annotations to entire function #1138
Conversation
Works already great 👍 One issue I remember with FCS, let f1 a = fun b -> a + b
let f2 a =
()
fun b -> a + b Both
-> In code action: let f1 (a: int) : int = fun b -> a + b
let f2 (a: int) : int -> int =
()
fun b -> a + b -> I don't know how difficult it is to handle here in FSAC... But I don't think we have to handle that and instead treat it as bug in FCS? (don't know if that behaviour is by design or accident) Handling
|
Hey Booksbaum, Thanks for all the pointers. I've had a similar issue with Telplin, so this edge case rings a bell.
Alright, I think I want to pursue what I have for now and not overly worry about getting it inside Inlay Hints. I tinker some more with this and poke you both when I could use a review. |
…en leading keyword and function name.
Close enough 😸, ready for review! |
This looks lovely - thank you for an exhaustive test suite as well. It's very easy to take fixes when they are of such a high quality! |
Hi @Booksbaum and @baronfel,
I noticed there is no code fix for an entire let binding:
In Rider, I'm used to annotating the entire function (all parameters without types + return type).
I'd like to take a stab at adding this for fsac.
I think this is good enough to take it: