diff --git a/src/fsharp/vs/Symbols.fs b/src/fsharp/vs/Symbols.fs index fb285db13f..e17d9a0d8f 100644 --- a/src/fsharp/vs/Symbols.fs +++ b/src/fsharp/vs/Symbols.fs @@ -81,6 +81,11 @@ module Impl = cpaths2 |> List.exists (canAccessFromCrossProject taccess1) | _ -> true // otherwise use the normal check + let getItem (ent:EntityRef) = + checkEntityIsResolved(ent) + if ent.IsModule then Item.ModuleOrNamespaces [ent] + else Item.UnqualifiedType [ent] + let getXmlDocSigForEntity g (tcImports:TcImports) (ent:EntityRef)= let amap = tcImports.GetImportMap() let infoReader = InfoReader(g, amap) @@ -122,10 +127,7 @@ type FSharpSymbol(g:TcGlobals, thisCcu, tcImports, item: (unit -> Item), access: and FSharpEntity(g:TcGlobals, thisCcu, tcImports: TcImports, entity:EntityRef) = inherit FSharpSymbol(g, thisCcu, tcImports, - (fun () -> - checkEntityIsResolved(entity); - if entity.IsModule then Item.ModuleOrNamespaces [entity] - else Item.UnqualifiedType [entity]), + (fun () -> getItem(entity)), (fun _this thisCcu2 ad -> checkForCrossProjectAccessibility (thisCcu2, ad) (thisCcu, entity.Accessibility)) // && AccessibilityLogic.IsEntityAccessible (tcImports.GetImportMap()) range0 ad entity) @@ -137,7 +139,9 @@ and FSharpEntity(g:TcGlobals, thisCcu, tcImports: TcImports, entity:EntityRef) = let isResolvedAndFSharp() = match entity with | ERefNonLocal(NonLocalEntityRef(ccu, _)) -> not ccu.IsUnresolvedReference && ccu.IsFSharp - | _ -> true + | _ -> + let ccu = defaultArg (ItemDescriptionsImpl.ccuOfItem g (getItem entity)) thisCcu + ccu.IsFSharp let isUnresolved() = entityIsUnresolved entity let isResolved() = not (isUnresolved()) @@ -1661,7 +1665,8 @@ and FSharpAssembly internal (g: TcGlobals, thisCcu, tcImports, ccu: CcuThunk) = member __.FileName = ccu.FileName member __.SimpleName = ccu.AssemblyName member __.IsProviderGenerated = ccu.IsProviderGenerated - member __.Contents = FSharpAssemblySignature(g, thisCcu, tcImports, ccu.Contents.ModuleOrNamespaceType) + member __.Contents = + FSharpAssemblySignature(g, (if ccu.IsUnresolvedReference then thisCcu else ccu), tcImports, ccu.Contents.ModuleOrNamespaceType) override x.ToString() = x.QualifiedName