Skip to content

Commit

Permalink
fix when parentModule not found
Browse files Browse the repository at this point in the history
  • Loading branch information
bung87 committed Oct 11, 2023
1 parent 6235d8f commit fac39a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/tools/suggest.nim
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,9 @@ proc executeCmd*(cmd: IdeCmd, file, dirtyfile: AbsoluteFile, line, col: int;
dirtyfile.isEmpty:
discard "no need to recompile anything"
else:
let modIdx = graph.parentModule(dirtyIdx)
var modIdx = graph.parentModule(dirtyIdx)
if modIdx == FileIndex(0):
modIdx = dirtyIdx
graph.markDirty dirtyIdx
graph.markClientsDirty dirtyIdx
# partially recompiling the project means that that VM and JIT state
Expand Down

0 comments on commit fac39a9

Please sign in to comment.