Skip to content

Commit 175736d

Browse files
auduchinokT-Gro
andauthored
Name resolution: actually add reported item when trying to replace (#14772)
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
1 parent 271790c commit 175736d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Compiler/Checking/NameResolution.fs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,14 +2137,16 @@ type TcResultsSinkImpl(tcGlobals, ?sourceText: ISourceText) =
21372137
if allowedRange m then
21382138
if replace then
21392139
remove m
2140-
elif not (isAlreadyDone endPos item m) then
2140+
2141+
if not (isAlreadyDone endPos item m) then
21412142
capturedNameResolutions.Add(CapturedNameResolution(item, tpinst, occurenceType, nenv, ad, m))
21422143

21432144
member sink.NotifyMethodGroupNameResolution(endPos, item, itemMethodGroup, tpinst, occurenceType, nenv, ad, m, replace) =
21442145
if allowedRange m then
21452146
if replace then
21462147
remove m
2147-
elif not (isAlreadyDone endPos item m) then
2148+
2149+
if not (isAlreadyDone endPos item m) then
21482150
capturedNameResolutions.Add(CapturedNameResolution(item, tpinst, occurenceType, nenv, ad, m))
21492151
capturedMethodGroupResolutions.Add(CapturedNameResolution(itemMethodGroup, [], occurenceType, nenv, ad, m))
21502152

0 commit comments

Comments
 (0)