diff options
Diffstat (limited to 'tests/test/tgenconst4.pp')
-rw-r--r-- | tests/test/tgenconst4.pp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test/tgenconst4.pp b/tests/test/tgenconst4.pp new file mode 100644 index 0000000000..d401150ed2 --- /dev/null +++ b/tests/test/tgenconst4.pp @@ -0,0 +1,15 @@ +{ %NORUN } +{$mode objfpc} +{ + test constants in generic procedures +} +program tgenconst4; + +generic procedure DoThis<T;const U:string>(msg: string = U); +begin + writeln(msg, ' sizeof:',sizeof(t), ' default: ', U); +end; + +begin + specialize DoThis<integer,'genparam'>('hello world'); +end. |