Skip to content

Commit f871587

Browse files
committed
use %raw
1 parent 8ee24af commit f871587

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Core__Null.resi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ let getWithDefault: (t<'a>, 'a) => 'a
109109
```rescript
110110
Null.getExn(Null.make(3))->assert_eq(3)
111111
112-
switch Null.getExn(Null.make("ReScript")) {
112+
switch Null.getExn(%raw("ReScript")) {
113113
| exception Invalid_argument(_) => assert(false)
114114
| value => assert_eq(value, "ReScript")
115115
}
116116
117-
switch Null.getExn(Null.null) {
117+
switch Null.getExn(%raw("null")) {
118118
| exception Invalid_argument(_) => assert(true)
119119
| _ => assert(false)
120120
}

src/Core__Nullable.resi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ let getWithDefault: (t<'a>, 'a) => 'a
137137
`getExn(value)` raises an exception if `null` or `undefined`, otherwise returns the value.
138138
139139
```rescript
140-
switch Nullable.getExn(Nullable.make("Hello")) {
140+
switch Nullable.getExn(%raw("Hello")) {
141141
| exception Invalid_argument(_) => assert(false)
142142
| value => assert_eq(value, "Hello")
143143
}
144144
145-
switch Nullable.getExn(Nullable.null) {
145+
switch Nullable.getExn(%raw("undefined")) {
146146
| exception Invalid_argument(_) => assert(true)
147147
| _ => assert(false)
148148
}

0 commit comments

Comments
 (0)