rdsteed / la-pe

Automatically exported from code.google.com/p/la-pe
0 stars 0 forks source link

constref fails to copy record under certain conditions #38

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What will reproduce the problem?

function RotatePoint2(constref p: TPoint; angle, mx, my: Extended): TPoint;
begin
  writeln(p);
end;

var
  p: TPoint;

begin
  p := [50, 50];

  // Fails
  RotatePoint2([p.x,p.y],3.14159265,0,0);

  // Works
  RotatePoint2([50, 50],3.14159265,0,0);
  RotatePoint2(Point(p.x,p.y),3.14159265,0,0);
end.  

What is the expected output? What do you see instead?

{X = 0, Y = 0}
{X = 50, Y = 50}
{X = 50, Y = 50}

Which version are you using?

https://github.com/SRL/Lape/tree/stable_booltests

Please provide any additional information below.

Original issue reported on code.google.com by Ollyyyyy...@gmail.com on 24 May 2015 at 5:55