From c6bed88d378232692f6c23ab9af3fb86447eb778 Mon Sep 17 00:00:00 2001 From: szdytom Date: Mon, 28 Aug 2023 22:15:10 +0800 Subject: [PATCH] Add test for basic custom struct --- tests/ok/custom-struct.ac | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/ok/custom-struct.ac diff --git a/tests/ok/custom-struct.ac b/tests/ok/custom-struct.ac new file mode 100644 index 0000000..e360fe7 --- /dev/null +++ b/tests/ok/custom-struct.ac @@ -0,0 +1,16 @@ +struct { + +struct And(p: P, q: Q) { + left = Fn<>() -> P { + return p; + }; + right = Fn<>() -> Q { + return q; + }; +}; + +AndLeft = Fn(h: And) -> P { + return h.p; +}; + +} main;