Преглед изворни кода

tests: add a test which checks that records destructors are not allowed

git-svn-id: branches/paul/extended_records@16546 -
paul пре 14 година
родитељ
комит
4c7e2679df
2 измењених фајлова са 18 додато и 0 уклоњено
  1. 1 0
      .gitattributes
  2. 17 0
      tests/test/terecs4.pp

+ 1 - 0
.gitattributes

@@ -9206,6 +9206,7 @@ tests/test/tenumerators1.pp svneol=native#text/pascal
 tests/test/terecs1.pp svneol=native#text/pascal
 tests/test/terecs2.pp svneol=native#text/pascal
 tests/test/terecs3.pp svneol=native#text/pascal
+tests/test/terecs4.pp svneol=native#text/pascal
 tests/test/terecs_u1.pp svneol=native#text/pascal
 tests/test/testcmem.pp svneol=native#text/plain
 tests/test/testda1.pp svneol=native#text/plain

+ 17 - 0
tests/test/terecs4.pp

@@ -0,0 +1,17 @@
+{ %fail}
+{ %norun}
+program terecs4;
+
+{$mode delphi}
+
+type
+  TFoo = record
+    destructor Destroy; // not allowed
+  end;
+
+destructor TFoo.Destroy;
+begin
+end;
+
+begin
+end.