HeapsIO / hxbit

Haxe Binary serialization and network synchronization library
155 stars 30 forks source link

Fix null accesses on field.access.* #74

Closed Speedphoenix closed 2 months ago

Speedphoenix commented 2 months ago

This happens at least when the constructor is not overridden (and the null access did not provide useful context)

From what I can tell, usually field.access is not null (but can be an empty array), but this yields null:

var f = (macro class {
    function new() {
    }
}).fields[0];
trace(f.access);

And the documentation does list it as nullable