From 952250b6d79063aa1066b0e945d58360bd70d09f Mon Sep 17 00:00:00 2001 From: Mel Date: Wed, 6 May 2026 18:49:26 +0200 Subject: Lowering pass test harness, and initial pass test suite Signed-off-by: Mel --- boot/tests/lower/structural_dedup.cskt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 boot/tests/lower/structural_dedup.cskt (limited to 'boot/tests/lower/structural_dedup.cskt') diff --git a/boot/tests/lower/structural_dedup.cskt b/boot/tests/lower/structural_dedup.cskt new file mode 100644 index 0000000..ee4bcd3 --- /dev/null +++ b/boot/tests/lower/structural_dedup.cskt @@ -0,0 +1,29 @@ +two functions taking the same anonymous tuple type produce just +one synthesized type entry. + +<<< + +f = fun (a (int, int)) int { return 0 } +g = fun (b (int, int)) int { return 0 } + +>>> + +(unit + (types + (type 0 int primitive) + (type 1 uint primitive) + (type 2 bool primitive) + (type 3 string primitive) + (type 4 float primitive) + (type 5 byte primitive) + (type 6 ascii primitive) + (type 7 void primitive) + (type 8 __cat_type_0 synthetic structure (field _0 (ref int)) (field _1 (ref int)) (depends_on 0 0))) + (functions + (function 0 f (returns (ref int)) (param a (ref __cat_type_0)) (block + (return (expr 0)) + )) + (function 1 g (returns (ref int)) (param b (ref __cat_type_0)) (block + (return (expr 0)) + ))) + (emission_order 0 1 2 3 4 5 6 7 8)) -- cgit 1.4.1