Skip to content

Commit

Permalink
fix position for "imported but not used" warning for modules inside b…
Browse files Browse the repository at this point in the history
…rackets (#23424)
  • Loading branch information
levovix0 committed Mar 21, 2024
1 parent d4b58b0 commit 5667fbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/importer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5667fbf

Please sign in to comment.