From 533c89e12818e6f1f1bd3561912eb7db86650082 Mon Sep 17 00:00:00 2001
From: maciej-izak <mizak.public@gmail.com>
Date: Tue, 21 Feb 2017 14:20:15 +0000
Subject: [PATCH] * New test for management operators to detect regressions
 like regression fixed in r35461 (many times initialized global variables)

git-svn-id: trunk@35463 -
---
 .gitattributes             |  1 +
 tests/test/tmoperator11.pp | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/test/tmoperator11.pp

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