{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4927","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4927/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4927/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4927/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/4927","id":139905843,"number":4927,"title":"Bad code generation in C++ with multiple interfaces","user":{"login":"soywiz","id":570848,"avatar_url":"https://avatars.githubusercontent.com/u/570848?v=3","gravatar_id":"","url":"https://api.github.com/users/soywiz","html_url":"https://github.com/soywiz","followers_url":"https://api.github.com/users/soywiz/followers","following_url":"https://api.github.com/users/soywiz/following{/other_user}","gists_url":"https://api.github.com/users/soywiz/gists{/gist_id}","starred_url":"https://api.github.com/users/soywiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soywiz/subscriptions","organizations_url":"https://api.github.com/users/soywiz/orgs","repos_url":"https://api.github.com/users/soywiz/repos","events_url":"https://api.github.com/users/soywiz/events{/privacy}","received_events_url":"https://api.github.com/users/soywiz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-10T14:39:13Z","updated_at":"2016-03-10T15:34:50Z","closed_at":"2016-03-10T14:43:20Z","body":"```\r\nclass Multiple {\r\n\tstatic public function main() {\r\n\t\ttest(new A());\r\n\t}\r\n\tstatic public function test(a:IA) {\r\n\t\ttrace(a.b());\r\n\t\ttrace(a.c());\r\n\t}\r\n}\r\n\r\nclass A implements IA {\r\n\tpublic function new() {\r\n\t}\r\n\t\r\n\tpublic function b():String {\r\n\t\treturn 'b';\r\n\t}\r\n\r\n\tpublic function c():String {\r\n\t\treturn 'c';\r\n\t}\r\n}\r\n\r\ninterface IA extends IBB extends IC {\r\n}\r\n\r\ninterface IBB extends IB {\r\n}\r\n\r\ninterface IB {\r\n\tfunction b():String;\r\n}\r\n\r\ninterface IC {\r\n\tfunction c():String;\r\n}\r\n```\r\n\r\n```\r\n./src/Multiple.cpp(62): error C2039: 'b': is not a member of 'IA_obj'\r\ninclude\\Multiple.h(8): note: see declaration of 'IA_obj'\r\n```\r\n\r\nThis generates valid javascript, flash, neko, php, python, java and C#. So it just fails on C++.\r\n\r\nThis problem is triggered with multiple interfaces and one of them extending another interface. So if I remove IBB, and IA extends directly from IB, it works.\r\n\r\nI could circumvent the problem in other circumnstances, but I'm having issues with [jtransc](https://github.com/jtransc/jtransc/) generated code and I cannot modify the source code (it fails with a interface like that in the kotlin runtime).\r\n\r\nIt fails with 3.2.1 and with latest nightly."},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments/194907049","html_url":"https://github.com/HaxeFoundation/haxe/issues/4927#issuecomment-194907049","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4927","id":194907049,"user":{"login":"Simn","id":634365,"avatar_url":"https://avatars.githubusercontent.com/u/634365?v=3","gravatar_id":"","url":"https://api.github.com/users/Simn","html_url":"https://github.com/Simn","followers_url":"https://api.github.com/users/Simn/followers","following_url":"https://api.github.com/users/Simn/following{/other_user}","gists_url":"https://api.github.com/users/Simn/gists{/gist_id}","starred_url":"https://api.github.com/users/Simn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simn/subscriptions","organizations_url":"https://api.github.com/users/Simn/orgs","repos_url":"https://api.github.com/users/Simn/repos","events_url":"https://api.github.com/users/Simn/events{/privacy}","received_events_url":"https://api.github.com/users/Simn/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T15:34:50Z","updated_at":"2016-03-10T15:34:50Z","body":"No problem!\r\n\r\nI'm very interested in the compiler hang. Let me know if you figure out where it comes from."}}