aboutsummaryrefslogtreecommitdiff
path: root/tests/iii/template-pack-errors/program.cps
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-21 05:43:35 +0000
committer_ov4 <ov4@ov4.org>2026-10-21 05:43:35 +0000
commitdd5bbae055fd34ce2e12ef63f8a261c6b15dc83e (patch)
tree757e367daacf92c50148eb42d7bda97ba33ed3fb /tests/iii/template-pack-errors/program.cps
parentc682f983b0dce3acba76d1f08719a26b9c52c5ec (diff)
feat(parser): parse TEMPLATE declarations, template ids and parameter packs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/iii/template-pack-errors/program.cps')
-rw-r--r--tests/iii/template-pack-errors/program.cps32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/iii/template-pack-errors/program.cps b/tests/iii/template-pack-errors/program.cps
new file mode 100644
index 0000000..51ffa46
--- /dev/null
+++ b/tests/iii/template-pack-errors/program.cps
@@ -0,0 +1,32 @@
+TEMPLATE <Rest...>
+PROCEDURE NotLast(Values : Rest..., Extra : INTEGER)
+ENDPROCEDURE
+
+TEMPLATE <Rest...>
+PROCEDURE ArrayPack(Values : ARRAY OF Rest...)
+ENDPROCEDURE
+
+TEMPLATE <T>
+PROCEDURE WrongPack(Values : T...)
+ENDPROCEDURE
+
+TEMPLATE <Rest...>
+PROCEDURE BarePack(Values : Rest...)
+ OUTPUT Values
+ENDPROCEDURE
+
+TEMPLATE <T>
+PROCEDURE ScalarExpansion(Value : T)
+ CALL Missing(Value...)
+ENDPROCEDURE
+
+TEMPLATE <T>
+PROCEDURE WrongTypeExpansion(Value : T)
+ CALL Missing<T...>(Value)
+ENDPROCEDURE
+
+TEMPLATE <Rest...>
+PROCEDURE MissingDots(Values : Rest)
+ENDPROCEDURE
+
+OUTPUT 0