Skip to content

Commit 7b6993d

Browse files
committed
FcsSymbolMappingUtil: use CompilationContextCookie symbol scope
1 parent 98dd9a5 commit 7b6993d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Util/FcsSymbolMappingUtil.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ public static ITypeElement GetTypeElement([NotNull] this FSharpEntity entity, [N
4444
if (clrTypeName == null)
4545
return null;
4646

47-
var typeElements = psiModule.GetSymbolScope(false).GetTypeElementsByCLRName(clrTypeName);
47+
var context = CompilationContextCookie.GetContext();
48+
var scopePsiModule = context.GetPsiModule() ?? psiModule;
49+
var scope = scopePsiModule.GetCachedCaseSensitiveSymbolScopeWithReferences();
50+
var typeElements = scope.GetTypeElementsByCLRName(clrTypeName);
51+
4852
if (typeElements.IsEmpty())
4953
{
5054
if (entity.IsProvidedAndGenerated &&

0 commit comments

Comments
 (0)