2 * Copyright (c) 2018, Facebook, Inc.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
16 let trivial_equality_check p bop env
((_
, ty1
), _
as te1
: expr
) ((_
, ty2
), _
as te2
: expr
) =
17 begin match te1
, te2
with
18 | (_
, Null
), ((_
, ty
), _
) | ((_
, ty
), _
), (_
, Null
) ->
19 Tast_env.assert_nullable p bop env ty
22 Tast_env.assert_nontrivial p bop env ty1 ty2
25 inherit Tast_visitor.handler_base
27 method! at_expr env
= function
28 | (p
, _
), Binop
((Eqeqeq
| Diff2
) as bop
, te1
, te2
) ->
29 trivial_equality_check p bop env te1 te2