diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-09-08 20:43:39 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-09-08 20:43:39 +0200 |
| commit | 47c8f99b6ef812dbc22ca56a39ba21bccad47796 (patch) | |
| tree | 7c057a6d408f9b30801767ed528f7f4c207bfbce /testsuite/runnable/generic_constructor.elna | |
| parent | 8f9ba0c67479d8926edead8aa828458c5b3bc1be (diff) | |
| download | elna-47c8f99b6ef812dbc22ca56a39ba21bccad47796.tar.gz | |
Implement generic pointers
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. |
