Skip to content

Commit

Permalink
Protect assembly exploration for C# extension members (#15271)
Browse files Browse the repository at this point in the history
  • Loading branch information
vzarytovskii authored May 29, 2023
1 parent 00fae43 commit ae8d3dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Compiler/Checking/NameResolution.fs
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,9 @@ let private GetCSharpStyleIndexedExtensionMembersForTyconRef (amap: Import.Impor

let csharpStyleExtensionMembers =
if IsTyconRefUsedForCSharpStyleExtensionMembers g m tcrefOfStaticClass || tcrefOfStaticClass.IsLocalRef then
GetImmediateIntrinsicMethInfosOfType (None, AccessorDomain.AccessibleFromSomeFSharpCode) g amap m ty
|> List.filter (IsMethInfoPlainCSharpStyleExtensionMember g m true)
protectAssemblyExploration [] (fun () ->
GetImmediateIntrinsicMethInfosOfType (None, AccessorDomain.AccessibleFromSomeFSharpCode) g amap m ty
|> List.filter (IsMethInfoPlainCSharpStyleExtensionMember g m true))
else
[]

Expand Down

0 comments on commit ae8d3dd

Please sign in to comment.