Skip to content

Commit 6a9fe4a

Browse files
authored
Untagged variants: consider regexp as an object type. (#6296)
1 parent 0d781ff commit 6a9fe4a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
1313
# 11.0.0-beta.3 (Unreleased)
1414

15+
#### :rocket: New Feature
16+
- Untagged variants: consider regexp as an object type. https://github.com/rescript-lang/rescript-compiler/pull/6296
17+
1518
# 11.0.0-beta.2
1619

1720
#### :rocket: New Feature

jscomp/ml/ast_untagged_variants.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ let type_is_builtin_object (t : Types.type_expr) =
117117
match t.desc with
118118
| Tconstr (path, _, _) ->
119119
let name = Path.name path in
120-
name = "Js.Dict.t" || name = "Js_dict.t"
120+
name = "Js.Dict.t" || name = "Js_dict.t" || name = "Js.Re.t" || name = "RescriptCore.Re.t"
121121
| _ -> false
122122

123123
let get_block_type ~env (cstr : Types.constructor_declaration) :

0 commit comments

Comments
 (0)