fix: extraction of null optional values
This commit is contained in:
parent
451bc20dde
commit
ba2955fe3a
1 changed files with 4 additions and 0 deletions
|
@ -1244,6 +1244,10 @@ fn Extractor(comptime T: type) type {
|
|||
},
|
||||
.optional => |opt_info| {
|
||||
var nested: opt_info.child = undefined;
|
||||
if (try matchNull(iter)) {
|
||||
self.dest.* = null;
|
||||
return true;
|
||||
}
|
||||
const extractor = Extractor(opt_info.child).init(&nested);
|
||||
if (try extractor.extract(iter)) {
|
||||
self.dest.* = nested;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue