{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/3181","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/3181/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/3181/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/3181/events","html_url":"https://github.com/nim-lang/Nim/issues/3181","id":98751309,"number":3181,"title":"Calling pointer to proc gives confusing error message","user":{"login":"skyfex","id":773906,"avatar_url":"https://avatars.githubusercontent.com/u/773906?v=3","gravatar_id":"","url":"https://api.github.com/users/skyfex","html_url":"https://github.com/skyfex","followers_url":"https://api.github.com/users/skyfex/followers","following_url":"https://api.github.com/users/skyfex/following{/other_user}","gists_url":"https://api.github.com/users/skyfex/gists{/gist_id}","starred_url":"https://api.github.com/users/skyfex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyfex/subscriptions","organizations_url":"https://api.github.com/users/skyfex/orgs","repos_url":"https://api.github.com/users/skyfex/repos","events_url":"https://api.github.com/users/skyfex/events{/privacy}","received_events_url":"https://api.github.com/users/skyfex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-03T14:03:25Z","updated_at":"2015-08-03T15:22:09Z","closed_at":null,"body":"```nim\r\nproc foo[T](p: ptr T) =\r\n    p()\r\n\r\nvar bar = proc () =\r\n    echo \"Hello\"\r\n\r\nfoo(addr(bar))\r\n```\r\n\r\nThis gives error ```Error: undeclared identifier: 'p'```\r\n\r\nChanging to ```p[]()``` works. Would perhaps be nice if ```p()``` would work too.\r\n\r\nIncidentally (not sure if this is a issue), I can't change ```var bar = proc ..``` into ```proc bar ..```. If I do that I get \"Error: expression has no address\". I tried adding procvar-pragma, but that didn't change it."},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/127275490","html_url":"https://github.com/nim-lang/Nim/issues/3181#issuecomment-127275490","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/3181","id":127275490,"user":{"login":"Araq","id":287816,"avatar_url":"https://avatars.githubusercontent.com/u/287816?v=3","gravatar_id":"","url":"https://api.github.com/users/Araq","html_url":"https://github.com/Araq","followers_url":"https://api.github.com/users/Araq/followers","following_url":"https://api.github.com/users/Araq/following{/other_user}","gists_url":"https://api.github.com/users/Araq/gists{/gist_id}","starred_url":"https://api.github.com/users/Araq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Araq/subscriptions","organizations_url":"https://api.github.com/users/Araq/orgs","repos_url":"https://api.github.com/users/Araq/repos","events_url":"https://api.github.com/users/Araq/events{/privacy}","received_events_url":"https://api.github.com/users/Araq/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T15:22:09Z","updated_at":"2015-08-03T15:22:09Z","body":"Not sure if there is any bug here. For proc pointers, use proc, not ptr proc."}}