{"action":"closed","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/3064","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/3064/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/3064/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/3064/events","html_url":"https://github.com/nim-lang/Nim/issues/3064","id":93056537,"number":3064,"title":"Minimal code triggering endless system.- in macro using `varargs[untyped]`","user":{"login":"oderwat","id":719156,"avatar_url":"https://avatars.githubusercontent.com/u/719156?v=3","gravatar_id":"","url":"https://api.github.com/users/oderwat","html_url":"https://github.com/oderwat","followers_url":"https://api.github.com/users/oderwat/followers","following_url":"https://api.github.com/users/oderwat/following{/other_user}","gists_url":"https://api.github.com/users/oderwat/gists{/gist_id}","starred_url":"https://api.github.com/users/oderwat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oderwat/subscriptions","organizations_url":"https://api.github.com/users/oderwat/orgs","repos_url":"https://api.github.com/users/oderwat/repos","events_url":"https://api.github.com/users/oderwat/events{/privacy}","received_events_url":"https://api.github.com/users/oderwat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-04T23:20:13Z","updated_at":"2015-07-05T12:05:26Z","closed_at":"2015-07-05T12:05:26Z","body":"I have some strange problem with the new `varags[untyped]` feature for macros which I could not reproduce until now in a short code fragment. I found it has to do with a proc type in an argument where the macro is used.\r\n\r\nSee this:\r\n\r\n```nim\r\nimport macros\r\n\r\nmacro newButton(x: varargs[untyped]): int =\r\n  echo repr(x)\r\n\r\n# change `proc` to e.g. pointer and it will work as expected\r\nproc makeButton(cb: proc): bool =\r\n  result = newButton(-1)\r\n\r\nproc callBack() = discard\r\n\r\ndiscard makeButton(callBack)\r\n```\r\nOutput:\r\n```\r\n[(system.-|system.-|system.-|system.-|system.-|system.-|system.-|system.-|system.-|system.-|system.-|system.-|system.-|system.-|system.-|...) 1]\r\n```\r\n"}}