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

+ tests missing from merge in r10923

git-svn-id: branches/fixes_2_2@10928 -
Jonas Maebe пре 17 година
родитељ
комит
ad295fbab9
3 измењених фајлова са 41 додато и 0 уклоњено
  1. 2 0
      .gitattributes
  2. 21 0
      tests/webtbf/tw10998a.pp
  3. 18 0
      tests/webtbs/tw10998.pp

+ 2 - 0
.gitattributes

@@ -7600,6 +7600,7 @@ tests/webtbf/tw10425a.pp svneol=native#text/plain
 tests/webtbf/tw10457.pp svneol=native#text/plain
 tests/webtbf/tw10849.pp svneol=native#text/plain
 tests/webtbf/tw10890a.pp svneol=native#text/plain
+tests/webtbf/tw10998a.pp svneol=native#text/plain
 tests/webtbf/tw11254a.pp svneol=native#text/plain
 tests/webtbf/tw1157a.pp svneol=native#text/plain
 tests/webtbf/tw1238.pp svneol=native#text/plain
@@ -7954,6 +7955,7 @@ tests/webtbs/tw10927.pp svneol=native#text/plain
 tests/webtbs/tw1096.pp svneol=native#text/plain
 tests/webtbs/tw1097.pp svneol=native#text/plain
 tests/webtbs/tw10979.pp svneol=native#text/plain
+tests/webtbs/tw10998.pp svneol=native#text/plain
 tests/webtbs/tw11006.pp svneol=native#text/plain
 tests/webtbs/tw1103.pp svneol=native#text/plain
 tests/webtbs/tw11033.pp svneol=native#text/plain

+ 21 - 0
tests/webtbf/tw10998a.pp

@@ -0,0 +1,21 @@
+{ %fail }
+
+program statictest;
+
+{$mode delphi}{$STATIC ON}
+
+type
+  TMyClass = class
+  public
+    class procedure StaticCall; static;
+  end;
+
+class procedure TMyClass.StaticCall;
+begin
+  WriteLn('Static method was called!');
+  writeln(ptruint(self));
+end;
+
+begin
+  TMyClass.StaticCall;
+end.

+ 18 - 0
tests/webtbs/tw10998.pp

@@ -0,0 +1,18 @@
+program statictest;
+
+{$mode delphi}{$STATIC ON}
+
+type
+  TMyClass = class
+  public
+    class procedure StaticCall; static;
+  end;
+
+class procedure TMyClass.StaticCall;
+begin
+  WriteLn('Static method was called!');
+end;
+
+begin
+  TMyClass.StaticCall;
+end.