Skip to content

Commit bf68289

Browse files
committed
Correct nullable_option serialization
Changed `Nullable_option.yojson_of_t` to serialize `None` as `Null` instead of asserting false.
1 parent 6d84c1c commit bf68289

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Add custom `ocamllsp/jumpToTypedHole` to navigate through typed holes (#1516)
77
- Add a code-action for combining pattern cases (just relaying on regex) (#1514)
88
- Allow (by configuration) shortening of diagnostics (just highlighting the first line) (#1513)
9+
- Fix `yojson_of_t` for `Nullable_option`: serialize `None` as `Null` instead of asserting false (#1525 fixes #1524)
910

1011
## Fixes
1112

lsp/src/import.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ module Json = struct
216216
;;
217217

218218
let yojson_of_t f = function
219-
| None -> assert false
219+
| None -> `Null
220220
| Some s -> f s
221221
;;
222222
end

0 commit comments

Comments
 (0)