From 189806c5f3115e2d14044399fadf94fd301fab9f Mon Sep 17 00:00:00 2001 From: Vasily Kirichenko Date: Thu, 5 Jan 2017 11:36:29 +0300 Subject: [PATCH] show Add Open code fix if the unresolved symbol is in the middle of the long ident --- src/fsharp/vs/ServiceAssemblyContent.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fsharp/vs/ServiceAssemblyContent.fs b/src/fsharp/vs/ServiceAssemblyContent.fs index 41f6f09a3c1..7aa5c61532f 100644 --- a/src/fsharp/vs/ServiceAssemblyContent.fs +++ b/src/fsharp/vs/ServiceAssemblyContent.fs @@ -467,9 +467,9 @@ module internal Entity = | _ -> partiallyQualifiedName |> Array.heads - // the last part must be unresolved, otherwise we show false positive suggestions like + // long ident must contain an unresolved part, otherwise we show false positive suggestions like // "open System" for `let _ = System.DateTime.Naaaw`. Here only "Naaw" is unresolved. - |> Array.filter (fun x -> not (x.[x.Length - 1].Resolved)) + |> Array.filter (fun x -> x |> Array.exists (fun x -> not x.Resolved)) |> Array.choose (fun parts -> let parts = parts |> Array.map (fun x -> x.Ident) if not (candidate |> Array.endsWith parts) then None