Repository navigation
TypeId: the counter starts lazily, without __init__ (v1) - #26
Merged
Merged
Conversation
TypeIds are made by other classes' static initializers (factories' `TYPE`s), and Haxe documents no order between those and TypeId's own static initialization. Under hxmc, `__init__` ran after the statics of classes reached earlier: it reset the counter, later ids repeated earlier ones, and the differ took one node type for another (a native view for an empty node: "invalid cast" in RNativeBase.update). The counter is now null until the first id is taken, which holds whatever the order. TypeIds are made once per node type, so the test costs nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fix from #25, applied to
v1, which has the sameTypeId.The counter is
Null<Int>, null until the first id is taken, instead of being reset in__init__. TypeIds are made by other classes' static initializers, and Haxe documents no order between those and an__init__. Under hxmc,__init__ran after them, ids repeated, and the differ confused node types. See #25 for the reproduction.TypeId.hxis byte-identical to #25's; it's tested there (JS and hxmc, plus coconut.appkit's demo test).🤖 Generated with Claude Code