Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4029f19

Browse files
vasily-kirichenkoKevinRansom
authored andcommitted
fix IndexOutOfRange exception in advanced completion (#3753)
1 parent80b8c9e commit4029f19

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/fsharp/vs/service.fs‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -567,14 +567,17 @@ type TypeCheckInfo
567567
| Item.Value_-> CompletionItemKind.Field
568568
|_-> CompletionItemKind.Other
569569

570+
letgetNamespace(idents:Idents)=
571+
if idents.Length>1then Some idents.[..idents.Length-2]else None
572+
570573
letunresolved=
571574
unresolvedEntity
572575
|> Option.map(fun x->
573-
letns=
574-
matchx.TopRequireQualifiedAccessParentwith
575-
| Some parentwhennot(Array.isEmpty parent)->
576-
parent.[..parent.Length-2]
577-
|_-> x.CleanedIdents.[..x.CleanedIdents.Length-2]
576+
letns=
577+
x.TopRequireQualifiedAccessParent
578+
|> Option.bind getNamespace
579+
|> Option.orElseWith(fun()-> getNamespace x.CleanedIdents)
580+
|> Option.defaultValue[||]
578581

579582
letdisplayName= x.CleanedIdents|> Array.skip ns.Length|> String.concat"."
580583

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp