From c56877035d6600b463a9cbf0e339f7548c0b46fd Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 21 Oct 2026 05:54:26 +0000 Subject: feat(codegen): instantiate function templates by deduction Co-Authored-By: Claude Opus 5.5 --- tests/i/template-multifile/program.cps | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/i/template-multifile/program.cps (limited to 'tests/i/template-multifile/program.cps') diff --git a/tests/i/template-multifile/program.cps b/tests/i/template-multifile/program.cps new file mode 100644 index 0000000..dd0684f --- /dev/null +++ b/tests/i/template-multifile/program.cps @@ -0,0 +1,14 @@ +INCLUDE "lib.cps" +TYPE Score + DECLARE Value : INTEGER +ENDTYPE +OVERLOAD FUNCTION OPERATOR>(Left : Score, Right : Score) RETURNS BOOLEAN + RETURN Left.Value > Right.Value +ENDFUNCTION +DECLARE Low : Score +DECLARE High : Score +Low.Value <- 3 +High.Value <- 9 +DECLARE Best : Score +Best <- Max(Low, High) +OUTPUT Best.Value -- cgit v1.3.1-4-g156e