aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-09 19:06:09 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-03-09 19:06:09 -0500
commit89d7098654750f35ae63cb751012f8c7d54aa583 (patch)
tree248141bc0926e87453cd5f5c1bbbb193a8e5e6ad /test
parent170c0a419794d184a941654b3b06ca12bbb9e194 (diff)
Add test for secret structs
Diffstat (limited to 'test')
-rw-r--r--test/structs.tm9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/structs.tm b/test/structs.tm
index c46c87e4..c038bd07 100644
--- a/test/structs.tm
+++ b/test/structs.tm
@@ -52,3 +52,12 @@ test_mixed()
struct LinkedList(x:Int, next=!LinkedList)
>> @LinkedList(10, @LinkedList(20))
+
+struct Password(text:Text; secret)
+>> my_pass := Password("Swordfish")
+= Password(...)
+>> users_by_password := {my_pass=> "User1", Password("xxx")=>"User2"}
+= {Password(...)=>"User1", Password(...)=>"User2"}
+>> users_by_password[my_pass]
+= "User1"
+