Skip to content

Commit c9f86ca

Browse files
committed
fix docstring test
1 parent 4d092f0 commit c9f86ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

runtime/Result.resi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ type t<'res, 'err> = result<'res, 'err> = Ok('res) | Error('err)
5353
```res example
5454
Result.getExn(Result.Ok(42)) == 42
5555

56-
Result.getExn(Result.Error("Invalid data")) /* raises exception */
56+
switch Result.getExn(Error("Invalid data")) {
57+
| exception Not_found => assert(true)
58+
| _ => assert(false)
59+
}
5760
```
5861
*/
5962
let getExn: result<'a, 'b> => 'a

0 commit comments

Comments
 (0)