diff --git a/.gitattributes b/.gitattributes index 276c1df999..9d9962fe93 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/tests/test/tmoperator11.pp b/tests/test/tmoperator11.pp new file mode 100644 index 0000000000..887157a945 --- /dev/null +++ b/tests/test/tmoperator11.pp @@ -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. \ No newline at end of file