Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal error: genMagicExpr: mArrPut #4491

Closed
liori opened this issue Jul 16, 2016 · 0 comments
Closed

internal error: genMagicExpr: mArrPut #4491

liori opened this issue Jul 16, 2016 · 0 comments

Comments

@liori
Copy link

liori commented Jul 16, 2016

When I'm compiling the following MWE file:

type
  TagGenerator = distinct string

proc `[]=`(s: TagGenerator; x: int; b: char): void {.borrow.}

proc next(tg: TagGenerator): void =
  tg[0] = 'x'

nim compiler fails with the following traceback:

bug.nim(7, 5) Error: internal error: genMagicExpr: mArrPut
Traceback (most recent call last)
nim.nim(115)             nim
nim.nim(71)              handleCmdLine
main.nim(254)            mainCommand
main.nim(65)             commandCompileToC
modules.nim(228)         compileProject
modules.nim(173)         compileModule
passes.nim(203)          processModule
passes.nim(137)          processTopLevelStmt
cgen.nim(1221)           myProcess
ccgstmts.nim(1120)       genStmts
ccgexprs.nim(2153)       expr
cgen.nim(789)            genProc
cgen.nim(759)            genProcNoForward
cgen.nim(679)            genProcAux
ccgstmts.nim(1120)       genStmts
ccgexprs.nim(2047)       expr
ccgexprs.nim(1758)       genMagicExpr
msgs.nim(996)            internalError
msgs.nim(970)            liMessage
msgs.nim(842)            handleError
msgs.nim(826)            quit
FAILURE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants