From 8ea930783d15c04bbe9a027eaf19ca10e2cd87c0 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 5 Jul 2026 20:38:14 +0200 Subject: Add tests for aggregate passing and returning --- testsuite/runnable/return_aggregate.elna | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 testsuite/runnable/return_aggregate.elna (limited to 'testsuite/runnable/return_aggregate.elna') diff --git a/testsuite/runnable/return_aggregate.elna b/testsuite/runnable/return_aggregate.elna new file mode 100644 index 0000000..54d833d --- /dev/null +++ b/testsuite/runnable/return_aggregate.elna @@ -0,0 +1,25 @@ +type + R = record + a: Int; + b: Int + end + +proc g() -> R + return R(1, 2) +end + +proc f() -> Int +var + result: Int +begin + if g() = R(1, 2) then + result := 0 + else + result := 1 + end; + return result +end + +return f() + +end. -- cgit v1.2.3