From 721618f65d3edfe3544406ca7dddfb51860fd532 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 20 Feb 2023 21:58:57 +0100 Subject: [PATCH] Name resolution: actually add reported item when trying to replace --- src/Compiler/Checking/NameResolution.fs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index 414d102b691..a678431c123 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -2128,14 +2128,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))