We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f40f4a commit d9a0a0dCopy full SHA for d9a0a0d
tests/simple/testdata/optionals.textproto
@@ -22,6 +22,18 @@ section: {
22
expr: "{'key': {}}.?key.optFlatMap(k, k.?subkey).hasValue()"
23
value: { bool_value: false }
24
}
25
+ test {
26
+ name: "map_null_entry_no_such_key"
27
+ expr: "{'null_key': null}.?null_key.invalid.hasValue()"
28
+ eval_error: {
29
+ errors: { message: "no such key" }
30
+ }
31
32
33
+ name: "map_undefined_entry_hasValue"
34
+ expr: "{}.?null_key.invalid.hasValue()"
35
+ value: { bool_value: false }
36
37
test {
38
name: "map_submap_subkey_optFlatMap_value"
39
expr: "{'key': {'subkey': 'subvalue'}}.?key.optFlatMap(k, k.?subkey).value()"
0 commit comments