+ test for mantis #36381 (seems already fixed)

git-svn-id: trunk@47337 -
This commit is contained in:
Jonas Maebe 2020-11-07 16:09:51 +00:00
parent 71b8d5643d
commit 49fbe53cf3
2 changed files with 33 additions and 0 deletions

1
.gitattributes vendored
View File

@ -18416,6 +18416,7 @@ tests/webtbs/tw36212.pp svneol=native#text/pascal
tests/webtbs/tw36215.pp svneol=native#text/pascal
tests/webtbs/tw3628.pp svneol=native#text/plain
tests/webtbs/tw3634.pp svneol=native#text/plain
tests/webtbs/tw36381.pp svneol=native#text/plain
tests/webtbs/tw36388.pp svneol=native#text/pascal
tests/webtbs/tw36389.pp svneol=native#text/pascal
tests/webtbs/tw36496a.pp svneol=native#text/pascal

32
tests/webtbs/tw36381.pp Normal file
View File

@ -0,0 +1,32 @@
{$mode objfpc}
program test;
type
TVec2 = record
x, y: single;
end;
function ViewToWorld (x, y: single): TVec2; overload;
begin
result.x := x;
result.y := y;
end;
function ViewToWorld (pt: TVec2): TVec2; overload; inline;
begin
result := ViewToWorld(pt.x, pt.y);
end;
var
pt: TVec2;
begin
pt.x:=1.0;
pt.y:=2.0;
// ERROR: Internal error 2009112601
pt := ViewToWorld(pt);
if pt.x<>1.0 then
halt(1);
if pt.y<>2.0 then
halt(2);
end.