diff options
Diffstat (limited to 'tests/test/tgenconst6.pp')
-rw-r--r-- | tests/test/tgenconst6.pp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test/tgenconst6.pp b/tests/test/tgenconst6.pp new file mode 100644 index 0000000000..03d056ffd8 --- /dev/null +++ b/tests/test/tgenconst6.pp @@ -0,0 +1,25 @@ +{ %NORUN } +{$mode delphi} +{ + test delphi mode +} +program tgenconst6; + +type + TList<T; const U: integer> = class + list: array[0..U-1] of T; + function capacity: integer; + end; + +function TList<T; U>.capacity: integer; +begin + result := U; +end; + +var + nums:TList<integer,16>; + strs:TList<string,16>; +begin + nums := TList<integer,16>.Create; + strs := TList<string,16>.Create; +end. |