{"action":"opened","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/4515","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/4515/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/4515/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/4515/events","html_url":"https://github.com/nim-lang/Nim/issues/4515","id":167489834,"number":4515,"title":"Try statement processing crash in async macro","user":{"login":"dom96","id":246651,"avatar_url":"https://avatars.githubusercontent.com/u/246651?v=3","gravatar_id":"","url":"https://api.github.com/users/dom96","html_url":"https://github.com/dom96","followers_url":"https://api.github.com/users/dom96/followers","following_url":"https://api.github.com/users/dom96/following{/other_user}","gists_url":"https://api.github.com/users/dom96/gists{/gist_id}","starred_url":"https://api.github.com/users/dom96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dom96/subscriptions","organizations_url":"https://api.github.com/users/dom96/orgs","repos_url":"https://api.github.com/users/dom96/repos","events_url":"https://api.github.com/users/dom96/events{/privacy}","received_events_url":"https://api.github.com/users/dom96/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nim-lang/Nim/labels/async","name":"async","color":"d93f0b"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-25T23:36:04Z","updated_at":"2016-07-25T23:36:04Z","closed_at":null,"body":"```nim\r\nimport asyncdispatch\r\nproc foo() {.async.} =\r\n  var x = await foo()\r\n  try:\r\n    let y = 42\r\n    return\r\n  except:\r\n    return\r\n\r\n```\r\n\r\nGives\r\n\r\n```nim\r\nstack trace: (most recent call last)\r\nlib/pure/asyncdispatch.nim(1933) async\r\nlib/pure/asyncdispatch.nim(1872) asyncSingleProc\r\nlib/pure/asyncdispatch.nim(1807) processBody\r\nlib/pure/asyncdispatch.nim(1799) processBody\r\nlib/pure/asyncdispatch.nim(1782) processForTry\r\n/private/tmp/aporia/a7.nim(2, 12) template/generic instantiation from here\r\n/Users/dom/projects/nim/lib/pure/asyncdispatch.nim(1782, 31) Error: index out of bounds\r\n```"}}
{"actor":{"display_login":"dom96"}}