瀏覽代碼

+ add test for already fixed #37380

Sven/Sarah Barth 2 年之前
父節點
當前提交
0628b5feba
共有 1 個文件被更改,包括 19 次插入0 次删除
  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.
+