Uh oh!
There was an error while loading. Please reload this page.
Better completion - #3940
Conversation
saul
left a comment
There was a problem hiding this comment.
Looks great. Any chance we could add a test for this?
vasily-kirichenko
commented
Nov 15, 2017
@dotnet-bot test Windows_NT Release_ci_part1 Build please |
vasily-kirichenko
commented
Nov 15, 2017
It's ready. |
cartermp
commented
Nov 16, 2017
vasily-kirichenko
commented
Nov 16, 2017
There is no ast until you close the paren. This is the same problem as with attributes completion - it suggests full type name until you close >] |
Yeah, just debugged this and noticed it 😄 . I suppose we can file that as a future problem to tackle. This looks good! |
vasily-kirichenko
commented
Nov 16, 2017
I’m not sure we can solve this problem without improving the parser. And i’m not sure it could be improved :) |
| | AttributeApplication | ||
| | OpenDeclaration | ||
| /// completing pattern type (e.g. foo (x: |)) | ||
| | PatternType |
There was a problem hiding this comment.
Should this be named ParameterTypeAnnotation or TypeAnnotation?
There was a problem hiding this comment.
Looks like TypeAnnotation would be the better candidate of my two suggestions since it is also hit here:
letfoo(s:string):^There was a problem hiding this comment.
No, this is for xx: type at any place, not just for parameters. And this thing is called pattern I think.
There was a problem hiding this comment.
Hmm, I think what you're referring to is the patterns that have type annotations, so PatternWithTypeAnnotation would be the name I'd think of here. That may have been what you meant, but when I read PatternType I thought it was referring to a completion context which constituted a pattern of any kind.
There was a problem hiding this comment.
I believe Pattern refers to the bound pattern (when deconstructing a DU, a tuple, a record, etc.) and Type to the type annotation.
letfoo((Some s):string option)=...parameter can be a simple symbol but also can be a pattern.
vasily-kirichenko
commented
Nov 18, 2017
Ooookey, it's ready. |

This partially fixes#3937