Jelajahi Sumber

* fix #40293: have the SysUtils unit use the TArray<> declaration in the ObjPas unit instead of declaring it again

Sven/Sarah Barth 2 tahun lalu
induk
melakukan
d24eeffa2b
2 mengubah file dengan 26 tambahan dan 1 penghapusan
  1. 0 1
      rtl/objpas/sysutils/syshelph.inc
  2. 26 0
      tests/webtbs/tw40293.pp

+ 0 - 1
rtl/objpas/sysutils/syshelph.inc

@@ -1,7 +1,6 @@
 {%mainunit syshelpers.pp}
 
 Type
-  generic TArray<T> = array of T;
   TStringArray = Array of string;
   TCharArray = Array of char;
   TEndian = ObjPas.TEndian;

+ 26 - 0
tests/webtbs/tw40293.pp

@@ -0,0 +1,26 @@
+unit tw40293;
+{$mode objfpc}{$H+}
+interface
+
+type
+  ftest1 = class
+    private
+      procedure setValue(value: specialize TArray<String>);
+      function getValue(): specialize TArray<String>;
+  end;
+
+
+implementation
+
+uses sysutils; // compile error if uncommented
+
+procedure ftest1.setValue(value: specialize TArray<String>);
+  begin
+  end;
+
+function ftest1.getValue(): specialize TArray<String>;
+  begin
+  end;
+
+end.
+