Browse Source

+ add test for already fixed #37380

Sven/Sarah Barth 2 years ago
parent
commit
6aab856213
1 changed files with 19 additions and 0 deletions
  1. 19 0
      tests/webtbs/tw37380.pp

+ 19 - 0
tests/webtbs/tw37380.pp

@@ -0,0 +1,19 @@
+{ %NORUN }
+
+program tw37380;
+{$mode delphi}
+function GTest<T>(a: T; b: T = T(1)): T;
+begin
+  Result := a + b;
+end;
+
+function Foobar(a: Single; b: Single = Single(1)): Single;
+begin
+  Result := a + b;
+end;
+
+begin
+  WriteLn(GTest<Single>(2, 1));
+  WriteLn(Foobar(2));
+end.
+