Add passing tests for open contracts
@@ -80,6 +80,14 @@ f `boo == 3) &&
(((fun r => r.b) | {a: Num | Dyn} -> Dyn) {a = 1, b = 2} == 2
| #Assert) &&
+// records_open_contracts
+(({a = 0, b = 0} | #{a | Num, ..}) == {a = 0, b = 0} | #Assert) &&
+(let Contract = {a | Num} & {..} in
+({a = 0, b = 0} | #Contract) == {a = 0, b = 0} | #Assert) &&
+(let Contract = {..} & {b | Num} in
+({a = 0, b = 0} | #Contract) == {a = 0, b = 0} | #Assert) &&
+(let Contract = {a | Num, ..} & {b | Num, ..} in
+({a = 0, b = 0, c = 0} | #Contract) == {a = 0, b = 0, c = 0} | #Assert) &&
// lists
(([1, "2", false] | List) == [1, "2", false] | #Assert) &&
@@ -92,5 +100,4 @@ f `boo == 3) &&
(({foo : {bar: Bool} | default = {bar = false}} & {foo.bar = true}).foo.bar
| #Assert) &&
-
true
