{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/8275","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/8275/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/8275/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/8275/events","html_url":"https://github.com/nim-lang/Nim/issues/8275","id":340087916,"node_id":"MDU6SXNzdWUzNDAwODc5MTY=","number":8275,"title":"[compiler bug] template redefinition silently accepted; should give `Error: redefinition` error","user":{"login":"timotheecour","id":2194784,"node_id":"MDQ6VXNlcjIxOTQ3ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2194784?v=4","gravatar_id":"","url":"https://api.github.com/users/timotheecour","html_url":"https://github.com/timotheecour","followers_url":"https://api.github.com/users/timotheecour/followers","following_url":"https://api.github.com/users/timotheecour/following{/other_user}","gists_url":"https://api.github.com/users/timotheecour/gists{/gist_id}","starred_url":"https://api.github.com/users/timotheecour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timotheecour/subscriptions","organizations_url":"https://api.github.com/users/timotheecour/orgs","repos_url":"https://api.github.com/users/timotheecour/repos","events_url":"https://api.github.com/users/timotheecour/events{/privacy}","received_events_url":"https://api.github.com/users/timotheecour/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-11T04:29:05Z","updated_at":"2018-07-11T20:04:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"```nim\r\n# D20180710T212850\r\n\r\nwhen false: # case1\r\n  # OK: Error: redefinition of 'foo'\r\n  proc foo(): int = 1\r\n  # proc foo(): int = 2\r\n\r\nwhen true: # case2\r\n  # BUG: compiles but should not\r\n  template foo(): int = 1\r\n  template foo(): int = 2\r\n\r\nwhen false:# case3\r\n  # OK: Error: redefinition of 'foo'\r\n  macro foo(): int = 1\r\n  macro foo(): int = 2\r\n\r\nwhen false: # case4\r\n  # OK: Error: ambiguous call;\r\n  proc foo(): int = 1\r\n  template foo(): int = 2\r\n\r\necho foo() # compiles with case2 but should not\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/404293089","html_url":"https://github.com/nim-lang/Nim/issues/8275#issuecomment-404293089","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/8275","id":404293089,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDI5MzA4OQ==","user":{"login":"Araq","id":287816,"node_id":"MDQ6VXNlcjI4NzgxNg==","avatar_url":"https://avatars1.githubusercontent.com/u/287816?v=4","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":"2018-07-11T20:04:16Z","updated_at":"2018-07-11T20:04:16Z","author_association":"MEMBER","body":"Well the ``unittest`` module uses this feature to allow users to override something. But I don't like this feature either."}}
{"actor":{"display_login":"Araq"}}