aboutsummaryrefslogtreecommitdiff
path: root/tests/iii/template-overload-errors
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-21 05:54:26 +0000
committer_ov4 <ov4@ov4.org>2026-10-21 05:54:26 +0000
commitc56877035d6600b463a9cbf0e339f7548c0b46fd (patch)
tree5b2af13b7f8f097d8de5436a729b39e85427b9f0 /tests/iii/template-overload-errors
parentdd5bbae055fd34ce2e12ef63f8a261c6b15dc83e (diff)
feat(codegen): instantiate function templates by deduction
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/iii/template-overload-errors')
-rw-r--r--tests/iii/template-overload-errors/case.json1
-rw-r--r--tests/iii/template-overload-errors/program.cps8
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/iii/template-overload-errors/case.json b/tests/iii/template-overload-errors/case.json
new file mode 100644
index 0000000..b3259c8
--- /dev/null
+++ b/tests/iii/template-overload-errors/case.json
@@ -0,0 +1 @@
+{"errors": [{"reason": "every overload must be declared OVERLOAD", "line": 1}]}
diff --git a/tests/iii/template-overload-errors/program.cps b/tests/iii/template-overload-errors/program.cps
new file mode 100644
index 0000000..9b60f76
--- /dev/null
+++ b/tests/iii/template-overload-errors/program.cps
@@ -0,0 +1,8 @@
+TEMPLATE <T>
+FUNCTION Pick(Value : T) RETURNS T
+ RETURN Value
+ENDFUNCTION
+OVERLOAD FUNCTION Pick(Value : INTEGER) RETURNS INTEGER
+ RETURN Value
+ENDFUNCTION
+OUTPUT Pick(1)