aboutsummaryrefslogtreecommitdiff
path: root/test/structs.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-14 13:30:46 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-14 13:30:46 -0400
commit1924f75647389003873c4532449484c65c83e79b (patch)
tree601018eb6a80e57e2dfb6623dd844812dd928394 /test/structs.tm
parent31814db0a6e698e218121b12838f411358bf78a5 (diff)
Support corecursive structs
Diffstat (limited to 'test/structs.tm')
-rw-r--r--test/structs.tm5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/structs.tm b/test/structs.tm
index ad8e7ad6..4fdec6ae 100644
--- a/test/structs.tm
+++ b/test/structs.tm
@@ -4,6 +4,9 @@ struct Mixed(x:Int, text:Text)
struct LinkedList(x:Int, next=!@LinkedList)
struct Password(text:Text; secret)
+struct CorecursiveA(other:@CorecursiveB?)
+struct CorecursiveB(other=!@CorecursiveA)
+
func test_literals():
>> x := Pair(10, 20)
= Pair(x=10, y=20)
@@ -63,3 +66,5 @@ func main():
>> users_by_password[my_pass]
= "User1"
+ >> CorecursiveA(@CorecursiveB())
+