Skip to content

Commit ee289bc

Browse files
committed
Update comment
1 parent a937c43 commit ee289bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/ml/translcore.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ let is_null_undefined_constant (exp : Typedtree.expression) =
419419
| _ -> false
420420

421421
let warn_on_polymorphic_comparison loc prim_name args = function
422-
(* Preserve the backend's old exemption for == / != against nullish constants,
423-
which compile to dedicated null/undefined checks rather than object compare. *)
422+
(* Skip warning 102 for `==` / `!=` when one side is a nullish constant:
423+
those cases lower to dedicated null/undefined checks, not object comparison. *)
424424
| Pobjcomp (Ceq | Cneq)
425425
when prim_name = "%equal_null"
426426
|| prim_name = "%equal_undefined"

0 commit comments

Comments
 (0)