ICE on template call resolution #4875

yglukhov opened this Issue Oct 10, 2016 · 0 comments


None yet

1 participant

type Bar = object
    mFoo: int

template foo(a: Bar): int = a.mFoo

    let foo = 5 # Rename this to smth else to make it work
    var b: Bar
test.nim(9, 15) Error: internal error: expr(skTemplate); unknown symbol
Traceback (most recent call last)
nim.nim(115)             nim
nim.nim(71)              handleCmdLine
main.nim(254)            mainCommand
main.nim(65)             commandCompileToC
modules.nim(238)         compileProject
system.nim(1105)         compileModule
passes.nim(198)          processModule
passes.nim(131)          processTopLevelStmt
cgen.nim(1217)           myProcess
ccgstmts.nim(1121)       genStmts
ccgexprs.nim(2057)       expr
ccgstmts.nim(506)        genBlock
ccgexprs.nim(2060)       expr
ccgstmts.nim(1121)       genStmts
ccgexprs.nim(2100)       expr
cgen.nim(451)            initLocExpr
ccgexprs.nim(2031)       expr
ccgcalls.nim(537)        genCall
ccgcalls.nim(184)        genPrefixCall
cgen.nim(451)            initLocExpr
ccgexprs.nim(2006)       expr
msgs.nim(994)            internalError
msgs.nim(968)            liMessage
msgs.nim(840)            handleError
msgs.nim(824)            quit
@Araq Araq added a commit that closed this issue Oct 20, 2016
@Araq Araq fixes #4875 7c0fa52
@Araq Araq closed this in 7c0fa52 Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment