From db8c7f14d2f74c3db205782acf8222cb7d91a047 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 21 Oct 2026 06:14:00 +0000 Subject: feat(codegen): instantiate class templates Co-Authored-By: Claude Opus 5.5 --- tests/i/template-classes/notes.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/i/template-classes/notes.md (limited to 'tests/i/template-classes/notes.md') diff --git a/tests/i/template-classes/notes.md b/tests/i/template-classes/notes.md new file mode 100644 index 0000000..96cfe22 --- /dev/null +++ b/tests/i/template-classes/notes.md @@ -0,0 +1,7 @@ +# Class templates + +Human review: pending. + +TEMPLATE is a compiler extension. Holder forces Box to instantiate during the type pre-pass. Make>() first creates Box through an explicit function argument and returns its default FALSE value. Holder's integer field defaults to zero. Box's explicit constructor then stores 7. Pair preserves its INTEGER and REAL fields, giving 3 and 2.500000. Stack3 pushes 10, 20 and 30 into three fixed scalar slots and pops them in reverse order. + +Keyword NEW constructs a fresh Box containing 5; DELETE releases that heap object. The nested Box copies the inner integer value 9. Box assignment copies its owning STRING field independently: changing Text to beta leaves Copy equal to alpha, and both values remain valid through cleanup. Group expands three method parameters and forwards them to PrintAll, yielding 1, 2.500000 and c. ShowGroup() instantiates an internally empty Group<> and its parameterless Show, producing no output. -- cgit v1.3.1-4-g156e