Skip to content

Commit

Permalink
Name resolution: actually add reported item when trying to replace (#…
Browse files Browse the repository at this point in the history
…14772)

Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
  • Loading branch information
auduchinok and T-Gro authored May 26, 2023
1 parent 271790c commit 175736d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Compiler/Checking/NameResolution.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2137,14 +2137,16 @@ type TcResultsSinkImpl(tcGlobals, ?sourceText: ISourceText) =
if allowedRange m then
if replace then
remove m
elif not (isAlreadyDone endPos item m) then

if not (isAlreadyDone endPos item m) then
capturedNameResolutions.Add(CapturedNameResolution(item, tpinst, occurenceType, nenv, ad, m))

member sink.NotifyMethodGroupNameResolution(endPos, item, itemMethodGroup, tpinst, occurenceType, nenv, ad, m, replace) =
if allowedRange m then
if replace then
remove m
elif not (isAlreadyDone endPos item m) then

if not (isAlreadyDone endPos item m) then
capturedNameResolutions.Add(CapturedNameResolution(item, tpinst, occurenceType, nenv, ad, m))
capturedMethodGroupResolutions.Add(CapturedNameResolution(itemMethodGroup, [], occurenceType, nenv, ad, m))

Expand Down

0 comments on commit 175736d

Please sign in to comment.