{"action":"closed","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/4526","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/4526/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/4526/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/4526/events","html_url":"https://github.com/nim-lang/Nim/issues/4526","id":168016934,"number":4526,"title":"getTypeImpl crashes (SIGSEGV) on variant types","user":{"login":"nigredo-tori","id":5962285,"avatar_url":"https://avatars.githubusercontent.com/u/5962285?v=3","gravatar_id":"","url":"https://api.github.com/users/nigredo-tori","html_url":"https://github.com/nigredo-tori","followers_url":"https://api.github.com/users/nigredo-tori/followers","following_url":"https://api.github.com/users/nigredo-tori/following{/other_user}","gists_url":"https://api.github.com/users/nigredo-tori/gists{/gist_id}","starred_url":"https://api.github.com/users/nigredo-tori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigredo-tori/subscriptions","organizations_url":"https://api.github.com/users/nigredo-tori/orgs","repos_url":"https://api.github.com/users/nigredo-tori/repos","events_url":"https://api.github.com/users/nigredo-tori/events{/privacy}","received_events_url":"https://api.github.com/users/nigredo-tori/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-28T05:43:18Z","updated_at":"2016-08-04T22:13:30Z","closed_at":"2016-08-04T22:13:30Z","body":"The following example:\r\n```nim\r\nimport macros\r\n\r\nmacro dumpTypeImpl(t: typed): stmt =\r\n  echo treeRepr(t.getTypeImpl())  \r\n  newStmtList()\r\n  \r\ntype\r\n  Test = object\r\n    case kind: bool\r\n    of true:\r\n      x: int\r\n    else:\r\n      y: string\r\n    \r\nvar t: Test\r\ndumpTypeImpl(t)\r\n```\r\nfails to compile in current devel branch:\r\n```\r\nTraceback (most recent call last)\r\nnim.nim(115)             nim\r\nnim.nim(71)              handleCmdLine\r\nmain.nim(254)            mainCommand\r\nmain.nim(65)             commandCompileToC\r\nmodules.nim(250)         compileProject\r\nmodules.nim(195)         compileModule\r\npasses.nim(203)          processModule\r\npasses.nim(137)          processTopLevelStmt\r\nsem.nim(488)             myProcess\r\nsem.nim(460)             semStmtAndGenerateGenerics\r\nsemstmts.nim(1545)       semStmt\r\nsemexprs.nim(873)        semExprNoType\r\nsemexprs.nim(2292)       semExpr\r\nsemexprs.nim(857)        semDirectOp\r\nsemexprs.nim(840)        afterCallActions\r\nsem.nim(365)             semMacroExpr\r\nvm.nim(1621)             evalMacroCall\r\nvm.nim(1214)             rawExecute\r\nvmdeps.nim(303)          opMapTypeImplToAst\r\nvmdeps.nim(92)           mapTypeToAstX\r\nsystem.nim(343)          mapTypeToAstX\r\nSIGSEGV: Illegal storage access. (Attempt to read from nil?)\r\nFAILURE\r\n```"}}
{"actor":{"display_login":"Araq"}}