{"action":"created","issue":{"url":"https://api.github.com/repos/Araq/Nim/issues/2184","labels_url":"https://api.github.com/repos/Araq/Nim/issues/2184/labels{/name}","comments_url":"https://api.github.com/repos/Araq/Nim/issues/2184/comments","events_url":"https://api.github.com/repos/Araq/Nim/issues/2184/events","html_url":"https://github.com/Araq/Nim/pull/2184","id":58418350,"number":2184,"title":"Allow empty sets in case/of branches.","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":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-20T22:17:34Z","updated_at":"2015-02-21T01:53:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Araq/Nim/pulls/2184","html_url":"https://github.com/Araq/Nim/pull/2184","diff_url":"https://github.com/Araq/Nim/pull/2184.diff","patch_url":"https://github.com/Araq/Nim/pull/2184.patch"},"body":"Added support for conditional compilation using 'when' with empty sets in 'case of' branches.\r\n\r\nAdded test category for conditional compilation. Test with `./koch test c conditional`. I think this could be continued with other \"when\" related code, like in objects or for example if supported in enums.\r\n\r\nThis was discussed in the forum http://forum.nim-lang.org/t/867 ...\r\n\r\n@Araq: Even if that won't be a correct & final solution it seems to work and I am so happy that I could create it :)"},"comment":{"url":"https://api.github.com/repos/Araq/Nim/issues/comments/75349727","html_url":"https://github.com/Araq/Nim/pull/2184#issuecomment-75349727","issue_url":"https://api.github.com/repos/Araq/Nim/issues/2184","id":75349727,"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},"created_at":"2015-02-21T01:53:17Z","updated_at":"2015-02-21T01:53:17Z","body":"To be correct: It now discards everything which follows a `{}` / `[]` in the branch. I am not sure if we have to change this to be something better, cause the use case for the empty set is not really asking for multiple parameters. I think I will change the implementation that it throws an error if there is not just a single {} or [] in that branch instead of discarding everything after it. That behavior feels better to me and just allows what we wanted to allow in the first place."}}