Repository navigation
Conversation
Under a script base, any name the emitter could not place was compiled to a field of `this`: a host type named without an import, or the package heading a dotted type path, read null at run time instead of resolving or refusing the module. The chain is now walked through each script base's own members, then the first host base's, as for a host base alone. 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.
Under a script base, a name the emitter could not place is no longer compiled to a field of
this.inheritedMemberanswered yes for any name as soon as the base was a script class. That check runs beforeworldTypeand the host globals, so in such a class:HostBase) compiled tothis.HostBase;haxeinhaxe.ds.StringMap) compiled tothis.haxe.Both read null at run time, silently, where the interpreter gives the right value. A typo did the same instead of refusing the module.
The emitter now records each batch class's own instance members at
declare, and walks the chain: each script base's members first, then the first host base through reflection, as it already did when the base was a host class. An unknown script base still answers yes, as before. The walk stops after 64 levels so a malformed cycle cannot hang it.Type.getClassName(HostBase), no importnullHostBaseType.getClassName(haxe.ds.StringMap)nullhaxe.ds.StringMap(compiled with #51)hello(),tag)Tests
cppia gave null,hi,t, interpreter gave HostBase,hi,tandcppia gave null, interpreter gave haxe.ds.StringMap.test/run.sh eval cpp: 421 / 421 / 452. Conformance columns are unchanged apart from the two new rows.Playground,Shapes) as the baseline.