You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix issue with untagged variants and object when null is one case. (#7303)
* Fix issue with untagged variants and object when null is one case.
Fixes#7289
The check emitted for case `Object` was simply `type of ... === "object"`, though that is insufficient when the variant has one case corresponding to `null`.
Now we check if such a variant case exists, and emit `... != null` in addition.
* Add test example.
Copy file name to clipboardexpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@
32
32
- Fix issue in functors with more than one argument (which are curried): emit nested function always. https://github.com/rescript-lang/rescript/pull/7273
33
33
- Fix dot completion issue with React primitives. https://github.com/rescript-lang/rescript/pull/7292
34
34
- Stdlib namespace for Core modules (fixes name clashes with user modules). https://github.com/rescript-lang/rescript/pull/7285
35
+
- Fix runtime type check for Object in untagged variants when one variant case is `null`. https://github.com/rescript-lang/rescript/pull/7303
0 commit comments