{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/6099","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/6099/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/6099/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/6099/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/6099","id":214723737,"number":6099,"title":"[lua] Enums and  @:expose","user":{"login":"Drabuna","id":54286,"avatar_url":"https://avatars0.githubusercontent.com/u/54286?v=3","gravatar_id":"","url":"https://api.github.com/users/Drabuna","html_url":"https://github.com/Drabuna","followers_url":"https://api.github.com/users/Drabuna/followers","following_url":"https://api.github.com/users/Drabuna/following{/other_user}","gists_url":"https://api.github.com/users/Drabuna/gists{/gist_id}","starred_url":"https://api.github.com/users/Drabuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drabuna/subscriptions","organizations_url":"https://api.github.com/users/Drabuna/orgs","repos_url":"https://api.github.com/users/Drabuna/repos","events_url":"https://api.github.com/users/Drabuna/events{/privacy}","received_events_url":"https://api.github.com/users/Drabuna/received_events","type":"User","site_admin":false},"labels":[{"id":41000434,"url":"https://api.github.com/repos/HaxeFoundation/haxe/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":352493151,"url":"https://api.github.com/repos/HaxeFoundation/haxe/labels/platform-lua","name":"platform-lua","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"jdonaldson","id":41479,"avatar_url":"https://avatars1.githubusercontent.com/u/41479?v=3","gravatar_id":"","url":"https://api.github.com/users/jdonaldson","html_url":"https://github.com/jdonaldson","followers_url":"https://api.github.com/users/jdonaldson/followers","following_url":"https://api.github.com/users/jdonaldson/following{/other_user}","gists_url":"https://api.github.com/users/jdonaldson/gists{/gist_id}","starred_url":"https://api.github.com/users/jdonaldson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdonaldson/subscriptions","organizations_url":"https://api.github.com/users/jdonaldson/orgs","repos_url":"https://api.github.com/users/jdonaldson/repos","events_url":"https://api.github.com/users/jdonaldson/events{/privacy}","received_events_url":"https://api.github.com/users/jdonaldson/received_events","type":"User","site_admin":false},"assignees":[{"login":"jdonaldson","id":41479,"avatar_url":"https://avatars1.githubusercontent.com/u/41479?v=3","gravatar_id":"","url":"https://api.github.com/users/jdonaldson","html_url":"https://github.com/jdonaldson","followers_url":"https://api.github.com/users/jdonaldson/followers","following_url":"https://api.github.com/users/jdonaldson/following{/other_user}","gists_url":"https://api.github.com/users/jdonaldson/gists{/gist_id}","starred_url":"https://api.github.com/users/jdonaldson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdonaldson/subscriptions","organizations_url":"https://api.github.com/users/jdonaldson/orgs","repos_url":"https://api.github.com/users/jdonaldson/repos","events_url":"https://api.github.com/users/jdonaldson/events{/privacy}","received_events_url":"https://api.github.com/users/jdonaldson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-03-16T14:31:15Z","updated_at":"2017-03-17T09:21:15Z","closed_at":null,"body":"I use enums quite a lot and according to documentation I should use @:expose if I want to expose this enum to be accessible outside of the generated code scope:\r\n\r\n`@:expose\r\nenum Color{\r\n    Red;\r\n    Green;\r\n    Blue;\r\n    Yellow;\r\n`\r\n\r\nIn generated code enum is not exposed. This is problematic, so I have to do workarounds and expose them using:\r\n\r\n`\r\nstatic function __init__(){\r\nuntyped __lua__('_hx_exports[\"enums\"][\"Color\"] = enums.Color');\r\n}\r\n`\r\n\r\nShould expose behave normally and just expose the enums?\r\n"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments/287305370","html_url":"https://github.com/HaxeFoundation/haxe/issues/6099#issuecomment-287305370","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/6099","id":287305370,"user":{"login":"Drabuna","id":54286,"avatar_url":"https://avatars0.githubusercontent.com/u/54286?v=3","gravatar_id":"","url":"https://api.github.com/users/Drabuna","html_url":"https://github.com/Drabuna","followers_url":"https://api.github.com/users/Drabuna/followers","following_url":"https://api.github.com/users/Drabuna/following{/other_user}","gists_url":"https://api.github.com/users/Drabuna/gists{/gist_id}","starred_url":"https://api.github.com/users/Drabuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drabuna/subscriptions","organizations_url":"https://api.github.com/users/Drabuna/orgs","repos_url":"https://api.github.com/users/Drabuna/repos","events_url":"https://api.github.com/users/Drabuna/events{/privacy}","received_events_url":"https://api.github.com/users/Drabuna/received_events","type":"User","site_admin":false},"created_at":"2017-03-17T09:21:15Z","updated_at":"2017-03-17T09:21:15Z","body":"@jdonaldson Imagine you have a function in haxe that will return an enum as a result. In your lua code you want to run different logic based on which enum value was returned. It would be very nice if you can just reuse enums for comparison."}}
{"actor":{"display_login":"Drabuna"}}