{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/520","repository_url":"https://api.github.com/repos/HaxeFoundation/hxcpp","labels_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/520/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/520/comments","events_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/520/events","html_url":"https://github.com/HaxeFoundation/hxcpp/issues/520","id":183264857,"number":520,"title":"Array<haxe.ds.Vector> does not allow [][] access","user":{"login":"velochy","id":5527789,"avatar_url":"https://avatars.githubusercontent.com/u/5527789?v=3","gravatar_id":"","url":"https://api.github.com/users/velochy","html_url":"https://github.com/velochy","followers_url":"https://api.github.com/users/velochy/followers","following_url":"https://api.github.com/users/velochy/following{/other_user}","gists_url":"https://api.github.com/users/velochy/gists{/gist_id}","starred_url":"https://api.github.com/users/velochy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/velochy/subscriptions","organizations_url":"https://api.github.com/users/velochy/orgs","repos_url":"https://api.github.com/users/velochy/repos","events_url":"https://api.github.com/users/velochy/events{/privacy}","received_events_url":"https://api.github.com/users/velochy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-16T12:37:03Z","updated_at":"2016-10-17T08:38:58Z","closed_at":null,"body":"I have a bunch of matrices stored as` Array<Vector<Float>>`. When I try accessing them with [i][j] syntax, compiler fails with: \r\n\r\n> error: invalid initialization of non-const reference of type ‘Array<double>&’ from an rvalue of type ‘Array<double>’\r\n>  HXLINE(  10)  ::haxe::Log_obj::trace(( (Float)(_hx_array_unsafe_get(av->__get((int)0).StaticCast< ::Array< Float > >(),(int)0)) ),hx::SourceInfo(HX_(\"VectorBug.hx\",4d,5d,55,37),10,HX_(\"VectorBug\",11,46,3a,19),HX_(\"main\",39,38,56,48)));\r\n\r\nWhat follows is a minimal example which gives this error (NB! without the trace, the access is optimized out).\r\n\r\n```\r\npackage;\r\nimport haxe.ds.Vector;\r\nclass VectorBug {\r\n\r\n\tpublic static function main ():Void {\r\n           var av = new Array<Vector<Float>>();\r\n           av.push(new Vector(1));\r\n          av[0][0] = 0.0;\r\n          trace(av[0][0]);\r\n\t}\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/comments/254146894","html_url":"https://github.com/HaxeFoundation/hxcpp/issues/520#issuecomment-254146894","issue_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/520","id":254146894,"user":{"login":"velochy","id":5527789,"avatar_url":"https://avatars.githubusercontent.com/u/5527789?v=3","gravatar_id":"","url":"https://api.github.com/users/velochy","html_url":"https://github.com/velochy","followers_url":"https://api.github.com/users/velochy/followers","following_url":"https://api.github.com/users/velochy/following{/other_user}","gists_url":"https://api.github.com/users/velochy/gists{/gist_id}","starred_url":"https://api.github.com/users/velochy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/velochy/subscriptions","organizations_url":"https://api.github.com/users/velochy/orgs","repos_url":"https://api.github.com/users/velochy/repos","events_url":"https://api.github.com/users/velochy/events{/privacy}","received_events_url":"https://api.github.com/users/velochy/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T08:38:58Z","updated_at":"2016-10-17T08:38:58Z","body":"3.3.49, i.e. the version up in Haxelib, not github master.\r\nIf that test snippet compiles with the new version, I think it is safe to assume it is fixed :)"}}
{"actor":{"display_login":"velochy"}}