{"action":"closed","issue":{"url":"https://api.github.com/repos/Araq/Nim/issues/1946","labels_url":"https://api.github.com/repos/Araq/Nim/issues/1946/labels{/name}","comments_url":"https://api.github.com/repos/Araq/Nim/issues/1946/comments","events_url":"https://api.github.com/repos/Araq/Nim/issues/1946/events","html_url":"https://github.com/Araq/Nim/issues/1946","id":54148905,"number":1946,"title":"strfmt.fmt() crashes the compiler","user":{"login":"ReneSac","id":6010063,"avatar_url":"https://avatars.githubusercontent.com/u/6010063?v=3","gravatar_id":"","url":"https://api.github.com/users/ReneSac","html_url":"https://github.com/ReneSac","followers_url":"https://api.github.com/users/ReneSac/followers","following_url":"https://api.github.com/users/ReneSac/following{/other_user}","gists_url":"https://api.github.com/users/ReneSac/gists{/gist_id}","starred_url":"https://api.github.com/users/ReneSac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReneSac/subscriptions","organizations_url":"https://api.github.com/users/ReneSac/orgs","repos_url":"https://api.github.com/users/ReneSac/repos","events_url":"https://api.github.com/users/ReneSac/events{/privacy}","received_events_url":"https://api.github.com/users/ReneSac/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Araq/Nim/labels/High+Priority","name":"High Priority","color":"e30c0c"},{"url":"https://api.github.com/repos/Araq/Nim/labels/Showstopper","name":"Showstopper","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-13T04:10:35Z","updated_at":"2015-01-18T02:10:34Z","closed_at":"2015-01-18T02:10:34Z","body":"the following code crashes the compiler:\r\n```nimrod\r\nimport strfmt\r\necho \"x {0}\".fmt(\"bla\")\r\n```\r\nI tested with strfmt version 0.3.1 and 0.5.1 and with the devel and master nim compiler. All give the same error:\r\n\r\n```\r\nHint: system [Processing]\r\nHint: a2 [Processing]\r\nHint: strfmt [Processing]\r\nHint: macros [Processing]\r\nHint: strutils [Processing]\r\nHint: parseutils [Processing]\r\nHint: unicode [Processing]\r\nHint: math [Processing]\r\nHint: times [Processing]\r\nHint: fenv [Processing]\r\nHint: unsigned [Processing]\r\nHint: pegs [Processing]\r\nHint: streams [Processing]\r\nTraceback (most recent call last)\r\nnim.nim(91)              nim\r\nnim.nim(55)              handleCmdLine\r\nmain.nim(259)            mainCommand\r\nmain.nim(67)             commandCompileToC\r\nmodules.nim(204)         compileProject\r\nmodules.nim(152)         compileModule\r\npasses.nim(193)          processModule\r\npasses.nim(137)          processTopLevelStmt\r\nsem.nim(434)             myProcess\r\nsem.nim(408)             semStmtAndGenerateGenerics\r\nsemstmts.nim(1322)       semStmt\r\nsemexprs.nim(851)        semExprNoType\r\nsemexprs.nim(2040)       semExpr\r\nsemexprs.nim(1657)       semMagic\r\nsemexprs.nim(834)        semDirectOp\r\nsemexprs.nim(717)        semOverloadedCallAnalyseEffects\r\nsemcall.nim(295)         semOverloadedCall\r\nsemcall.nim(141)         resolveOverloads\r\nsemcall.nim(59)          pickBestCandidate\r\nsigmatch.nim(1518)       matches\r\nsigmatch.nim(1486)       matchesAux\r\nsigmatch.nim(1357)       prepareOperand\r\nsemexprs.nim(26)         semOperand\r\nsemexprs.nim(2052)       semExpr\r\nsemexprs.nim(748)        semIndirectOp\r\nsemexprs.nim(2020)       semExpr\r\nsemexprs.nim(835)        semDirectOp\r\nsemexprs.nim(818)        afterCallActions\r\nsem.nim(336)             semMacroExpr\r\nvm.nim(1465)             evalMacroCall\r\nvm.nim(987)              rawExecute\r\nvm.nim(211)              putIntoReg\r\nsystem.nim(2164)         FieldDiscriminantCheck\r\nError: unhandled exception: assignment to discriminant changes object branch [FieldError]\r\n> Process terminated with exit code 256\r\n```\r\nI can't trackdown any further because I'm not familiar with the strfmt codebase."}}