Add test for basic custom struct

This commit is contained in:
方而静 2023-08-28 22:15:10 +08:00
parent 3640da1cf2
commit c6bed88d37
Signed by: szTom
GPG Key ID: 072D999D60C6473C

16
tests/ok/custom-struct.ac Normal file
View File

@ -0,0 +1,16 @@
struct {
struct And<P, Q>(p: P, q: Q) {
left = Fn<>() -> P {
return p;
};
right = Fn<>() -> Q {
return q;
};
};
AndLeft = Fn<P, Q>(h: And<P, Q>) -> P {
return h.p;
};
} main;