@@ -81,6 +81,11 @@ module Impl =
81
81
cpaths2 |> List.exists ( canAccessFromCrossProject taccess1)
82
82
| _ -> true // otherwise use the normal check
83
83
84
+ let getItem ( ent : EntityRef ) =
85
+ checkEntityIsResolved( ent)
86
+ if ent.IsModule then Item.ModuleOrNamespaces [ ent]
87
+ else Item.UnqualifiedType [ ent]
88
+
84
89
let getXmlDocSigForEntity g ( tcImports : TcImports ) ( ent : EntityRef )=
85
90
let amap = tcImports.GetImportMap()
86
91
let infoReader = InfoReader( g, amap)
@@ -122,10 +127,7 @@ type FSharpSymbol(g:TcGlobals, thisCcu, tcImports, item: (unit -> Item), access:
122
127
123
128
and FSharpEntity ( g : TcGlobals , thisCcu , tcImports : TcImports , entity : EntityRef ) =
124
129
inherit FSharpSymbol( g, thisCcu, tcImports,
125
- ( fun () ->
126
- checkEntityIsResolved( entity);
127
- if entity.IsModule then Item.ModuleOrNamespaces [ entity]
128
- else Item.UnqualifiedType [ entity]),
130
+ ( fun () -> getItem( entity)),
129
131
( fun _this thisCcu2 ad ->
130
132
checkForCrossProjectAccessibility ( thisCcu2, ad) ( thisCcu, entity.Accessibility))
131
133
// && AccessibilityLogic.IsEntityAccessible (tcImports.GetImportMap()) range0 ad entity)
@@ -137,7 +139,9 @@ and FSharpEntity(g:TcGlobals, thisCcu, tcImports: TcImports, entity:EntityRef) =
137
139
let isResolvedAndFSharp () =
138
140
match entity with
139
141
| ERefNonLocal( NonLocalEntityRef( ccu, _)) -> not ccu.IsUnresolvedReference && ccu.IsFSharp
140
- | _ -> true
142
+ | _ ->
143
+ let ccu = defaultArg ( ItemDescriptionsImpl.ccuOfItem g ( getItem entity)) thisCcu
144
+ ccu.IsFSharp
141
145
142
146
let isUnresolved () = entityIsUnresolved entity
143
147
let isResolved () = not ( isUnresolved())
@@ -1661,7 +1665,8 @@ and FSharpAssembly internal (g: TcGlobals, thisCcu, tcImports, ccu: CcuThunk) =
1661
1665
member __.FileName = ccu.FileName
1662
1666
member __.SimpleName = ccu.AssemblyName
1663
1667
member __.IsProviderGenerated = ccu.IsProviderGenerated
1664
- member __.Contents = FSharpAssemblySignature( g, thisCcu, tcImports, ccu.Contents.ModuleOrNamespaceType)
1668
+ member __.Contents =
1669
+ FSharpAssemblySignature( g, ( if ccu.IsUnresolvedReference then thisCcu else ccu), tcImports, ccu.Contents.ModuleOrNamespaceType)
1665
1670
1666
1671
1667
1672
override x.ToString () = x.QualifiedName
0 commit comments