-
Notifications
You must be signed in to change notification settings - Fork 55
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
Context Actions: support named patterns annotation #783
base: main
Are you sure you want to change the base?
Conversation
48ad561
to
4b4ae9d
Compare
@@ -19,3 +21,8 @@ let getFunctionTypeArgs includeReturnType fcsType = | |||
acc | |||
|
|||
loop fcsType [] |> List.rev | |||
|
|||
let fixIfOptionalParameter (pattern: IReferencePat) fcsType = |
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.
What does fix
mean here?
What does it return? And what happens if the parameter is not optional?
|
||
|
||
[<ContextAction(Name = "AnnotatePattern", GroupType = typeof<FSharpContextActions>, | ||
Description = "Annotate named pattern")>] |
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.
Do we only want to work it for named patterns?
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.
In this PR, I would focus on named patterns (for example, we now show inlay hints mainly for named patterns)
@@ -50,7 +50,12 @@ module SpecifyTypes = | |||
parenPat.SetPattern(pattern) |> ignore | |||
parenPat :> IFSharpPattern | |||
|
|||
let specifyParameterType displayContext (fcsType: FSharpType) (pattern: IFSharpPattern) = | |||
let specifyPattern displayContext (fcsType: FSharpType) (pattern: IFSharpPattern) = |
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.
What does 'specify pattern' mean?
d5d6089
to
cc0e5ef
Compare
No description provided.