Wondering if the Masters of Haxe Compilation™ can help me here…
Scenario:
I am using two haxelibs (away3d and away3d-csg) which have a similar package structure, i.e. they both start with “away3d”, such as “package away3d.materials” etc. There are some private fields in away3d which are marked with @:allow, such as:
@:allow(away3d) private function addOwner(owner:IMaterialOwner):Void
When I compile with Haxe 4.1.5, the class in away3d-csg is able to use addOwner with no runtime error. When I use Haxe 4.2.5, it generates a runtime error “TypeError: this._material.addOwner is not a function”.
Possible Solution?
I suspected that Haxe got stricter about package access in the recent version, so I attempted to use @:access metadata in the AwayCSG class which is used by my application but I don’t seem to have the right solution. This doesn’t work:
@:access(away3d.materials.MaterialBase)
or this: @:access(away3d.materials.MaterialBase.addOwner)
Am I anywhere close to a solution? Thanks in advance!