Skip to content

[cpp] Fix unreflective iterators causing Null Function error - #13026

Open
tobil4sk wants to merge 2 commits into
HaxeFoundation:developmentfrom
tobil4sk:fix/cpp-unreflective-iterable
Open

tobil4sk wants to merge 2 commits into
HaxeFoundation:developmentfrom
tobil4sk:fix/cpp-unreflective-iterable

Conversation

@tobil4sk

Copy link
Copy Markdown
Member

Unreflective iterators were broken in 0b2b0da, because the iterator fields are now accessed via dynamic field lookup instead of direct calls (which is also less optimal in general). This partially reverts 4a181fd, which fixes #12369.

Presumably, the original commit was intended to fix: #11891 (comment), so this probably requires testing (and ideally a proper test case) to prevent that issue from returning. @yuxiaomao would you be able to check if this causes that has no field hasNext() error to return?

@yuxiaomao

Copy link
Copy Markdown
Contributor

I do not have the original repro, but (probably) the same project build with your branche + development, I have the following errors. (no error on other tested projects)

[ERROR] (unknown position)

     | Type not found : ArrayIterator

[ERROR] src/ui/win/Debrief.hx:485: characters 15-31

 485 |     for (c in debrief.captured) {
     |               ^^^^^^^^^^^^^^^^
     | hxbit.ArrayProxyIterator<hxbit.ObjProxy_Op_ent_Player_u_st_Unit> should be hxbit.ArrayProxyIterator_hxbit_ObjProxy_Op_ent_Player_u_st_Unit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MySQL database connects on haxe 4.3.7 but fails on haxe 5/nightly

2 participants