Browse Source

tests: add type, var sections fail test

git-svn-id: trunk@15647 -
paul 15 years ago
parent
commit
c7de16cae1
2 changed files with 19 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 18 0
      tests/test/tclass10b.pp

+ 1 - 0
.gitattributes

@@ -9078,6 +9078,7 @@ tests/test/tcint64.pp svneol=native#text/plain
 tests/test/tclass1.pp svneol=native#text/plain
 tests/test/tclass10.pp svneol=native#text/pascal
 tests/test/tclass10a.pp svneol=native#text/pascal
+tests/test/tclass10b.pp svneol=native#text/pascal
 tests/test/tclass11a.pp svneol=native#text/pascal
 tests/test/tclass11b.pp svneol=native#text/pascal
 tests/test/tclass12a.pp svneol=native#text/pascal

+ 18 - 0
tests/test/tclass10b.pp

@@ -0,0 +1,18 @@
+{ %FAIL}
+program tclass10b;
+{$ifdef fpc}
+  {$mode delphi}
+{$endif}
+
+// check that "protected" or any other section resets the section type to accept regular fields
+
+type
+  Tfoo=class
+  type private
+    TF = (one,two,three);
+  type protected
+    f: TF;
+  end;
+
+begin
+end.