I have a bit of code that works fine normally but when run in a static: section gives the following error:
Error: internal error: getNullValue: tyNil
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp c <file>
When I recompile as instructed, it gives:
Error: internal error: getNullValue: tyNil
Traceback (most recent call last)
nim.nim(94) nim
nim.nim(56) handleCmdLine
main.nim(251) mainCommand
main.nim(62) commandCompileToC
modules.nim(203) compileProject
modules.nim(151) compileModule
passes.nim(197) processModule
passes.nim(137) processTopLevelStmt
sem.nim(446) myProcess
sem.nim(420) semStmtAndGenerateGenerics
semstmts.nim(1343) semStmt
semexprs.nim(893) semExprNoType
semexprs.nim(2226) semExpr
semstmts.nim(1213) semStaticStmt
vm.nim(1447) evalStaticStmt
vm.nim(1437) evalConstExprAux
vm.nim(847) rawExecute
vm.nim(360) compile
vmgen.nim(1776) genProc
vmgen.nim(239) gen
vmgen.nim(1613) gen
vmgen.nim(239) gen
vmgen.nim(1589) gen
vmgen.nim(1214) genAsgn
vmgen.nim(234) gen
vmgen.nim(1596) gen
vmgen.nim(422) genCase
vmgen.nim(1656) gen
vmgen.nim(1499) genObjConstr
vmgen.nim(244) genx
vmgen.nim(1657) gen
vmgen.nim(1519) genTupleConstr
vmgen.nim(244) genx
vmgen.nim(1585) gen
vmgen.nim(1393) getNullValue
msgs.nim(854) internalError
msgs.nim(784) rawMessage
msgs.nim(781) rawMessage
msgs.nim(728) handleError
FAILURE
Right now I'm trying to make a reduced example, but I end up just creating other issues that get in the way.
Wondering of someone can at least help me narrow down what I should be looking for based on the info above.
...there's a function that returns a tuple that holds a sequence, a proc and a bool. If I remove the proc from the code and run it, the computer freezes for several seconds then I get an out of memory message.
Again, it only does this when run at compile time.
EDIT: I'm on a recent 10.3 devel build
When recompiled as above, it seems to get stuck in a loop on...
ast.nim(1416) copyTree