SIGSEGV while sem-ing an uninitialized requiresInit variable
alaviss opened this issue · comments
Example
type X {.requiresInit.} = object
var y: X
Actual Output
nim.nim(154) nim
nim.nim(89) handleCmdLine
main.nim(524) mainCommand
main.nim(491) compileToBackend
main.nim(214) commandCompileToC
modules.nim(212) compileProject
modules.nim(128) compileModule
passes.nim(275) processModule
passes.nim(102) processTopLevelStmt
sem.nim(905) myProcess
sem.nim(823) semStmtAndGenerateGenerics nkStmtList 371735 test.nim(1, 5)
semstmts.nim(3404) semStmt
semexprs.nim(1451) semExprNoType
semexprs.nim(3830) semExpr nkStmtList 371735 test.nim(1, 5)
semstmts.nim(3300) semStmtList nkStmtList 371735 test.nim(1, 5)
semexprs.nim(3834) semExpr nkVarSection 371736 test.nim(3, 0)
semstmts.nim(1352) semConstLetOrVar nkVarSection 371736 test.nim(3, 0)
semstmts.nim(931) semNormalizedLetOrVar
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Expected Output
Some kind of errors about not declaring the value of y
, or no error because y
is never used.
I'm on it.
The problem is fixed, but the issue wasn't automatically closed.