Browse Source

Added test for Mantis #25044 which has been fixed in revision 29537.

git-svn-id: trunk@29687 -
svenbarth 10 years ago
parent
commit
a7085ea34e
2 changed files with 38 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 37 0
      tests/webtbs/tw25044.pp

+ 1 - 0
.gitattributes

@@ -14111,6 +14111,7 @@ tests/webtbs/tw2503.pp svneol=native#text/plain
 tests/webtbs/tw25030.pp svneol=native#text/pascal
 tests/webtbs/tw2504.pp svneol=native#text/plain
 tests/webtbs/tw25043.pp svneol=native#text/pascal
+tests/webtbs/tw25044.pp svneol=native#text/pascal
 tests/webtbs/tw25054a.pp svneol=native#text/pascal
 tests/webtbs/tw25054b.pp svneol=native#text/pascal
 tests/webtbs/tw25059.pp svneol=native#text/pascal

+ 37 - 0
tests/webtbs/tw25044.pp

@@ -0,0 +1,37 @@
+{ %NORUN }
+
+program tw25044;
+
+{$IFDEF FPC}
+  {$MODE DELPHI}
+{$ENDIF}
+
+type
+  TBase = class(TObject)
+  end;
+
+  TDescendant = class(TBase)
+  end;
+
+  T123456789012345678901 = record
+  public
+    Value: TDescendant;
+
+    class operator Implicit(Operand: T123456789012345678901): TBase;
+    class operator Implicit(Operand: T123456789012345678901): TDescendant;
+  end;
+
+{ T123456789012345678901 }
+
+class operator T123456789012345678901.Implicit(Operand: T123456789012345678901): TBase;
+begin
+  Result := Operand.Value;
+end;
+
+class operator T123456789012345678901.Implicit(Operand: T123456789012345678901): TDescendant;
+begin
+  Result := Operand.Value;
+end;
+
+begin
+end.