{"action":"opened","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/7942","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/7942/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/7942/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/7942/events","html_url":"https://github.com/nim-lang/Nim/issues/7942","id":328663443,"node_id":"MDU6SXNzdWUzMjg2NjM0NDM=","number":7942,"title":"JS compile error with insert + inline","user":{"login":"michael72","id":3508395,"node_id":"MDQ6VXNlcjM1MDgzOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3508395?v=4","gravatar_id":"","url":"https://api.github.com/users/michael72","html_url":"https://github.com/michael72","followers_url":"https://api.github.com/users/michael72/followers","following_url":"https://api.github.com/users/michael72/following{/other_user}","gists_url":"https://api.github.com/users/michael72/gists{/gist_id}","starred_url":"https://api.github.com/users/michael72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael72/subscriptions","organizations_url":"https://api.github.com/users/michael72/orgs","repos_url":"https://api.github.com/users/michael72/repos","events_url":"https://api.github.com/users/michael72/events{/privacy}","received_events_url":"https://api.github.com/users/michael72/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-01T21:16:20Z","updated_at":"2018-06-01T21:16:20Z","closed_at":null,"author_association":"NONE","body":"The following code fails to compile with JS / nodejs backend (current develop)\r\n\r\n```nim\r\nimport sequtils\r\n\r\ntype\r\n  Foo* = ref object\r\n    items: seq[int]\r\n\r\n{.push inline.}\r\nproc bar*(s: Foo) =\r\n  s.items.insert(0, 0)\r\n{.pop.}\r\n```\r\ncompiling with\r\n```console\r\nnim js -d:nodejs chk.nim\r\n```\r\nI get the compile output:\r\n```console\r\nHint: system [Processing]\r\nHint: chk [Processing]\r\nHint: sequtils [Processing]\r\nHint: macros [Processing]\r\nchk.nim(9, 10) template/generic instantiation from here\r\nlib\\system.nim(1593, 7) template/generic instantiation from here\r\nchk.nim(7, 8) Error: attempting to call undeclared routine: 'inline'\r\n```\r\nusing `{.inline.}` instead of `{.push inline.}` and `{.pop.}` or calling some other function than `insert` solves the problem.\r\n"}}
{"actor":{"display_login":"michael72"}}