fix position for "imported but not used" warning for modules inside brackets (#23424)

This commit is contained in:
Александр Старочкин
2024-03-21 10:03:31 +03:00
committed by GitHub
parent d4b58b0b06
commit 5667fbfbf3

View File

@@ -344,9 +344,11 @@ proc evalImport*(c: PContext, n: PNode): PNode =
imp[lastPos] = x[1]
impAs[1] = imp
impAs[2] = x[2]
impAs.info = x[2].info
impMod(c, impAs, result)
else:
imp[lastPos] = x
imp.info = x.info
impMod(c, imp, result)
else:
impMod(c, it, result)