{"action":"closed","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4437","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4437/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4437/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4437/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/4437","id":96930814,"number":4437,"title":"inconsistent treatment of module class and classes in the same file as the module class when Using-by-proxy","user":{"login":"makoConstruct","id":346569,"avatar_url":"https://avatars.githubusercontent.com/u/346569?v=3","gravatar_id":"","url":"https://api.github.com/users/makoConstruct","html_url":"https://github.com/makoConstruct","followers_url":"https://api.github.com/users/makoConstruct/followers","following_url":"https://api.github.com/users/makoConstruct/following{/other_user}","gists_url":"https://api.github.com/users/makoConstruct/gists{/gist_id}","starred_url":"https://api.github.com/users/makoConstruct/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makoConstruct/subscriptions","organizations_url":"https://api.github.com/users/makoConstruct/orgs","repos_url":"https://api.github.com/users/makoConstruct/repos","events_url":"https://api.github.com/users/makoConstruct/events{/privacy}","received_events_url":"https://api.github.com/users/makoConstruct/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-24T00:07:31Z","updated_at":"2015-07-24T05:46:04Z","closed_at":"2015-07-24T05:46:04Z","body":"take the following example\r\n\r\nImportByProxySuccess.hx\r\n```\r\nusing A;\r\n\r\nclass Main{\r\n  var b:B;\r\n  static public function main(){\r\n    trace(\"runs fine\");\r\n  }\r\n}\r\n```\r\n\r\nImportByProxyFailure.hx\r\n```\r\nusing A;\r\n\r\nclass Main{\r\n  var b:BAssociate;\r\n  static public function main(){\r\n    trace(\"does not run\");\r\n  }\r\n}\r\n```\r\n\r\nA.hx\r\n```\r\nusing B;\r\n```\r\n\r\nB.hx\r\n```\r\nclass B{}\r\nclass BAssociate{}\r\n```\r\n\r\nImportByProxySuccess will compile, but ImportByProxyFailure will not. I would prefer both to work, I would not be surprised if neither worked, but I am astonished to find that one works and the other does not."}}