{"action":"closed","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/4066","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/4066/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/4066/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/4066/events","html_url":"https://github.com/nim-lang/Nim/issues/4066","id":147007031,"number":4066,"title":"Enum items generated by a macro have wrong type.","user":{"login":"yglukhov","id":6962409,"avatar_url":"https://avatars.githubusercontent.com/u/6962409?v=3","gravatar_id":"","url":"https://api.github.com/users/yglukhov","html_url":"https://github.com/yglukhov","followers_url":"https://api.github.com/users/yglukhov/followers","following_url":"https://api.github.com/users/yglukhov/following{/other_user}","gists_url":"https://api.github.com/users/yglukhov/gists{/gist_id}","starred_url":"https://api.github.com/users/yglukhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yglukhov/subscriptions","organizations_url":"https://api.github.com/users/yglukhov/orgs","repos_url":"https://api.github.com/users/yglukhov/repos","events_url":"https://api.github.com/users/yglukhov/events{/privacy}","received_events_url":"https://api.github.com/users/yglukhov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-08T18:49:17Z","updated_at":"2016-05-18T10:40:20Z","closed_at":"2016-05-18T10:40:20Z","body":"```nim\r\nimport macros\r\n\r\ntype DefinedEnum = enum\r\n    deItem1\r\n\r\nmacro genEnum(): untyped =\r\n  newNimNode(nnkEnumTy).add(newEmptyNode(), newIdentNode(\"geItem1\"))\r\n\r\ntype GeneratedEnum = genEnum()\r\n\r\ndoAssert(type(deItem1) is DefinedEnum) # OK\r\ndoAssert(type(geItem1) is GeneratedEnum) # FAILS! \r\n```"}}