aboutsummaryrefslogtreecommitdiff
path: root/test/structs.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-12 04:09:52 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-12 04:09:52 -0400
commit43f4f3610e5258afbfb9e313c989e1e52f477c38 (patch)
tree1f960cd930ed7e1e251ed24700c613a01221443b /test/structs.tm
parentfb6dc0a8b9b5537ef708778bf013f71f98fad41f (diff)
For single-member structs/enums, don't print the member name
Diffstat (limited to 'test/structs.tm')
-rw-r--r--test/structs.tm3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/structs.tm b/test/structs.tm
index 53d356f5..d68bbe8b 100644
--- a/test/structs.tm
+++ b/test/structs.tm
@@ -1,4 +1,5 @@
+struct Single(x:Int)
struct Pair(x,y:Int)
struct Mixed(x:Int, text:Text)
struct LinkedList(x:Int, next=!@LinkedList)
@@ -8,6 +9,8 @@ struct CorecursiveA(other:@CorecursiveB?)
struct CorecursiveB(other=!@CorecursiveA)
func test_literals():
+ >> Single(123)
+ = Single(123)
>> x := Pair(10, 20)
= Pair(x=10, y=20)
>> y := Pair(y=20, 10)