diff options
Diffstat (limited to 'testsuite/runnable/generic_constructor.elna')
| -rw-r--r-- | testsuite/runnable/generic_constructor.elna | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/runnable/generic_constructor.elna b/testsuite/runnable/generic_constructor.elna new file mode 100644 index 0000000..201e1b1 --- /dev/null +++ b/testsuite/runnable/generic_constructor.elna @@ -0,0 +1,22 @@ +type + File = record + fd: Int + end + + Stack#[T] = record + items: T; + top: Word + end + +var + s: Stack#[^File] + f: File + +program() +begin + s := Stack#[^File]{ top: 1u, items: @f }; + assert(s.top = 1u); + assert(s.items = @f) +return 0u8 + +end. |
