Skip to content

Commit 4111476

Browse files
committed
Add more examples for clarity
1 parent 7e02f5a commit 4111476

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/Section 3 -- Type System.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,11 @@ Literal Value | Variables | Coerced Value
16621662
`{ a: "abc", b: null }` | `{}` | Error: Exactly one key must be specified
16631663
`{ b: $var }` | `{ var: null }` | Error: Value for member field {b} must be non-null
16641664
`{ b: 123, c: "xyz" }` | `{}` | Error: Exactly one key must be specified
1665+
`{ a: $a, b: $b }` | `{}` | Error: Exactly one key must be specified
1666+
`{ a: $a, b: $b }` | `{ a: "abc" }` | `{ a: "abc" }`
1667+
`{ a: $a, b: $b }` | `{ b: 123 }` | `{ b: 123 }`
1668+
`{ a: $a, b: $b }` | `{ a: "abc", b: 123 }` | Error: Exactly one key must be specified
1669+
`{ a: $a, b: $b }` | `{ a: null, b: 123 }` | Error: Exactly one key must be specified
16651670

16661671
**Type Validation**
16671672

0 commit comments

Comments
 (0)