{"action":"created","issue":{"url":"https://api.github.com/repos/cogneco/ooc-kean/issues/572","labels_url":"https://api.github.com/repos/cogneco/ooc-kean/issues/572/labels{/name}","comments_url":"https://api.github.com/repos/cogneco/ooc-kean/issues/572/comments","events_url":"https://api.github.com/repos/cogneco/ooc-kean/issues/572/events","html_url":"https://github.com/cogneco/ooc-kean/issues/572","id":112131936,"number":572,"title":"rock tries to resolve enum values inside versioned-out blocks","user":{"login":"sebastianbaginski","id":13517893,"avatar_url":"https://avatars.githubusercontent.com/u/13517893?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastianbaginski","html_url":"https://github.com/sebastianbaginski","followers_url":"https://api.github.com/users/sebastianbaginski/followers","following_url":"https://api.github.com/users/sebastianbaginski/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbaginski/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbaginski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbaginski/subscriptions","organizations_url":"https://api.github.com/users/sebastianbaginski/orgs","repos_url":"https://api.github.com/users/sebastianbaginski/repos","events_url":"https://api.github.com/users/sebastianbaginski/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbaginski/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cogneco/ooc-kean/labels/bug","name":"bug","color":"881111"},{"url":"https://api.github.com/repos/cogneco/ooc-kean/labels/help%20wanted","name":"help wanted","color":"009800"},{"url":"https://api.github.com/repos/cogneco/ooc-kean/labels/high","name":"high","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-10-19T12:14:20Z","updated_at":"2015-10-19T12:50:01Z","closed_at":null,"body":"```ooc\r\nversion(windows) {\r\ninclude windows\r\nTestEnum: enum {\r\n\tSymbol1 = WAIT_OBJECT_0\r\n}\r\n}\r\n\r\n```\r\n\r\n> rock_tmp/ooc/enums/enums.c: In function ‘enums_load’:\r\n> rock_tmp/ooc/enums/enums.c : 100:13: error: ‘WAIT_OBJECT_0’ undeclared (first use in this function)\r\n>             WAIT_OBJECT_0\r\n>             ^\r\n>rock_tmp/ooc/enums/enums.c : 100:13: note: each undeclared identifier is reported only once for >each function it appears in\r\n\r\n\r\nthis won't compile on Unix as rock tries to resolve the value of `Symbol1`, even though everything is inside version block specific to Windows.\r\nThis is very bad, because in `x11.ooc` file there are two enum types specific to x11, which are causing compilation failure on Windows.\r\nNow there is no version block around these (pull request coming up), but it fails even when entire x11.ooc file is inside version block."},"comment":{"url":"https://api.github.com/repos/cogneco/ooc-kean/issues/comments/149204298","html_url":"https://github.com/cogneco/ooc-kean/issues/572#issuecomment-149204298","issue_url":"https://api.github.com/repos/cogneco/ooc-kean/issues/572","id":149204298,"user":{"login":"sebastianbaginski","id":13517893,"avatar_url":"https://avatars.githubusercontent.com/u/13517893?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastianbaginski","html_url":"https://github.com/sebastianbaginski","followers_url":"https://api.github.com/users/sebastianbaginski/followers","following_url":"https://api.github.com/users/sebastianbaginski/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbaginski/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbaginski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbaginski/subscriptions","organizations_url":"https://api.github.com/users/sebastianbaginski/orgs","repos_url":"https://api.github.com/users/sebastianbaginski/repos","events_url":"https://api.github.com/users/sebastianbaginski/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbaginski/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T12:50:01Z","updated_at":"2015-10-19T12:50:01Z","body":"This would also work:\r\n```ooc\r\nversion(windows) {\r\ninclude windows\r\n\tSymbol1: extern (WAIT_OBJECT_0) Long\r\n}\r\n\r\n```"}}