Skip to content

Commit f15c15d

Browse files
vasily-kirichenkoKevinRansom
authored andcommitted
show Add Open code fix if the unresolved symbol is in the middle of the long ident (dotnet#2166)
1 parent 2dc9f6f commit f15c15d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fsharp/vs/ServiceAssemblyContent.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,9 @@ module internal Entity =
467467
| _ ->
468468
partiallyQualifiedName
469469
|> Array.heads
470-
// the last part must be unresolved, otherwise we show false positive suggestions like
470+
// long ident must contain an unresolved part, otherwise we show false positive suggestions like
471471
// "open System" for `let _ = System.DateTime.Naaaw`. Here only "Naaw" is unresolved.
472-
|> Array.filter (fun x -> not (x.[x.Length - 1].Resolved))
472+
|> Array.filter (fun x -> x |> Array.exists (fun x -> not x.Resolved))
473473
|> Array.choose (fun parts ->
474474
let parts = parts |> Array.map (fun x -> x.Ident)
475475
if not (candidate |> Array.endsWith parts) then None

0 commit comments

Comments
 (0)