* New test for management operators to detect regressions like regression fixed in r35461 (many times initialized global variables)

git-svn-id: trunk@35463 -
This commit is contained in:
maciej-izak 2017-02-21 14:20:15 +00:00
parent b86f2d7e3c
commit 533c89e128
2 changed files with 30 additions and 0 deletions

1
.gitattributes vendored
View File

@ -12709,6 +12709,7 @@ tests/test/tmcbool2.pp svneol=native#text/plain
tests/test/tmmx1.pp svneol=native#text/plain
tests/test/tmoperator1.pp svneol=native#text/pascal
tests/test/tmoperator10.pp svneol=native#text/pascal
tests/test/tmoperator11.pp svneol=native#text/pascal
tests/test/tmoperator2.pp svneol=native#text/pascal
tests/test/tmoperator3.pp svneol=native#text/pascal
tests/test/tmoperator4.pp svneol=native#text/pascal

View File

@ -0,0 +1,29 @@
program tmoperator11;
{$MODE DELPHI}
var
i: Integer = 0;
type
TFoo = record
class operator Initialize(var aFoo: TFoo);
procedure Foo;
end;
class operator TFoo.Initialize(var aFoo: TFoo);
begin
Inc(i);
end;
procedure TFoo.Foo;
begin
end;
var
f: TFoo;
begin
if i <> 1 then
Halt(1);
f.Foo;
end.