[Pas2js] TJSFloat32Array casting

Ryan Joseph ryan at thealchemistguild.com
Sun May 20 10:54:59 CEST 2018


Did something change? I just tried this and it didn’t work. Casting “arr” to TJSObject didn’t work either. I could swear that used to work a few days ago. Maybe an overload is missing? If TJSArray = TJSObject then should “array of single” = TJSObject?

var
 arr: array of single;
begin

TJSFloat32Array.new(TJSArray(arr)); // Incompatible type arg no. 1: Got "TJSArray", expected “TJSArrayBuffer”
TJSFloat32Array.new(TJSObject(arr)); // Illegal type conversion: "array type" to "class TJSObject”

Regards,
	Ryan Joseph



More information about the Pas2js mailing list