Perform nil checks during object construction and within compiles()

Close https://github.com/nim-lang/Nim/issues/6494
This commit is contained in:
Zahary Karadjov 2020-03-29 20:31:37 +03:00 • committed by Andreas Rumpf
commit 4f3d309fb0
4 changed files with 10 additions and 7 deletions

View file

@ -584,7 +584,7 @@ proc semStmtAndGenerateGenerics(c: PContext, n: PNode): PNode =
result = buildEchoStmt(c, result)
if c.config.cmd == cmdIdeTools:
appendToModule(c.module, result)
trackTopLevelStmt(c, c.module, result)
trackStmt(c, c.module, result, isTopLevel = true)
proc recoverContext(c: PContext) =
# clean up in case of a semantic error: We clean up the stacks, etc. This is