[Pas2js] Subclassing TJSArray

Ryan Joseph ryan at thealchemistguild.com
Fri May 11 12:03:32 CEST 2018



> On May 11, 2018, at 4:53 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
> Unless I made a mistake in the translation, it looks like a compiler bug.

Sorry my email was missing the original reason I used GetElements (which was private anyways and hacked around that). Doesn’t matter though I guess because I get the JavaScript error.

function TVec2.GetX: GLfloat;
begin
	result := GLfloat([0]); // Illegal type conversion: "set" to "Double"
end;

procedure TVec2.SetX (newValue: GLfloat);
begin
	[0] := newValue; // Variable identifier expected
end;

Regards,
	Ryan Joseph



More information about the Pas2js mailing list