Skip to content

Commit ba5d030

Browse files
authored
clean up type lookup in instanceof untagged variants (#6396)
1 parent e7d4868 commit ba5d030

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

jscomp/ml/ast_untagged_variants.ml

+4-6
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,10 @@ let type_to_instanceof_backed_obj (t : Types.type_expr) =
151151
Some Array
152152
| Tconstr (path, _, _) -> (
153153
match Path.name path with
154-
| "Js.Date.t" | "Js_date.t" -> Some(Date)
155-
| "Js.Re.t" | "Js_re.t" | "RescriptCore.Re.t" ->
156-
(* TODO: Get rid of explicit Core by digging through aliases *)
157-
Some(RegExp)
158-
| "Js.File.t" | "Js_file.t" -> Some(File)
159-
| "Js.Blob.t" | "Js_blob.t" -> Some(Blob)
154+
| "Js_date.t" -> Some(Date)
155+
| "Js_re.t" -> Some(RegExp)
156+
| "Js_file.t" -> Some(File)
157+
| "Js_blob.t" -> Some(Blob)
160158
| _ -> None)
161159
| _ -> None
162160

0 commit comments

Comments
 (0)