Using 4.0.0-preview.4, I want to instantiate an Int with raw byte values (more convenient way for me to write it out) like this:
var bof = Bytes.ofData([ 0x00, 0x06, 0x05, 0x00, 0xF2, 0x15, 0xCC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00 ]);
But this doesn’t compile. I get
Array<Int> should be haxe.io.BytesData. So I have to add a
var bof = Bytes.ofData(cast [ 0x00, 0x06, 0x05, 0x00 ]);
Why is that necessary and is there a reason I can’t just say these values are all actually 8-bit and instantiate accordingly?