nim-lang / redis

Official redis wrapper for Nim.
Other
128 stars 35 forks source link

internal error: genLiteral: ty is nil #8

Closed majj closed 6 years ago

majj commented 6 years ago

.nimble\pkgs\redis-0.2.0\redis.nim(309, 13) Error: internal error: genLiteral: ty is nil Traceback (most recent call last) nim.nim(133) nim nim.nim(97) handleCmdLine main.nim(162) mainCommand main.nim(73) commandCompileToC modules.nim(124) compileProject modules.nim(71) compileModule passes.nim(194) processModule passes.nim(103) processTopLevelStmt cgen.nim(1378) myProcess ccgstmts.nim(1152) genStmts ccgexprs.nim(2285) expr ccgstmts.nim(314) genVarStmt ccgstmts.nim(298) genSingleVar ccgstmts.nim(82) loadInto ccgcalls.nim(559) genAsgnCall ccgcalls.nim(187) genPrefixCall ccgcalls.nim(170) genArg cgen.nim(495) initLocExprSingleUse ccgexprs.nim(2235) expr ccgcalls.nim(548) genCall ccgcalls.nim(195) genPrefixCall cgen.nim(490) initLocExpr ccgexprs.nim(2168) expr cgen.nim(887) genProc cgen.nim(852) genProcNoForward cgen.nim(751) genProcAux ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr (132 calls omitted) ... ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2261) expr ccgstmts.nim(513) genBlock ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2047) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2264) expr ccgstmts.nim(355) genIf ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2047) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2285) expr ccgstmts.nim(316) genVarStmt ccgstmts.nim(306) genClosureVar ccgstmts.nim(82) loadInto ccgcalls.nim(559) genAsgnCall ccgcalls.nim(195) genPrefixCall cgen.nim(490) initLocExpr ccgexprs.nim(2168) expr cgen.nim(887) genProc cgen.nim(852) genProcNoForward cgen.nim(751) genProcAux ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2047) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2047) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2285) expr ccgstmts.nim(316) genVarStmt ccgstmts.nim(306) genClosureVar ccgstmts.nim(93) loadInto ccgexprs.nim(2262) expr ccgexprs.nim(2054) genStmtListExpr ccgexprs.nim(2281) expr ccgexprs.nim(2001) genClosure cgen.nim(490) initLocExpr ccgexprs.nim(2168) expr cgen.nim(887) genProc cgen.nim(852) genProcNoForward cgen.nim(751) genProcAux ccgstmts.nim(1152) genStmts ccgexprs.nim(2284) expr ccgstmts.nim(491) genWhileStmt ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2261) expr ccgstmts.nim(513) genBlock ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2047) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2263) expr ccgexprs.nim(2058) genStmtList ccgstmts.nim(1152) genStmts ccgexprs.nim(2288) expr ccgstmts.nim(778) genCase ccgstmts.nim(752) genOrdinalCase ccgstmts.nim(729) genCaseRange ccgexprs.nim(83) genLiteral ccgexprs.nim(34) genLiteral msgs.nim(524) internalError msgs.nim(495) liMessage msgs.nim(324) handleError msgs.nim(314) quit

fixed by split the '+','-' to two line : ` var res = case line[0]

of '+': @[r.parseStatus(line)]

of '-': @[r.parseStatus(line)]

`

dom96 commented 6 years ago

https://github.com/nim-lang/Nim/issues/8399

I'll create a workaround and push, ran into this myself. Nice to see others using Redis with latest Nim devel too :)

majj commented 6 years ago

Nim Compiler Version 0.18.1 [Windows: amd64]