-
Notifications
You must be signed in to change notification settings - Fork 845
Add parameter name hints for discriminated unions #14262
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
Conversation
|
Should be good to go unless there's some other way of using DUs that I didn't think of. |
psfinaki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos for jumping on that, @kerams!
Good testing and optimizations, and also thanks for keeping the original errh "design" - we'll see how long it's going to make sense :)
psfinaki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good to go unless there's some other way of using DUs that I didn't think of.
@kerams so actually, just before I wanted to reapprove the PR, I opened our own repo with these DU hints on and discovered that there are some places that cause crashes now. The easiest repro is the following:
type X =
member _.Test() = 42 :: [42; 42]So yeah we should handle and test this :)
|
Hehe, to be fair it's I think |
|
Thanks again - btw while testing parameter name hints I actually found a bug in type hints, should be also an easy fix. |
Implements #14257.