Fix ServiceInterceptor::getValueAsType
[hiphop-php.git] / hphp / hack / src / typing / tast_check / tautology_check.ml
blob7607f48f45a3fb3d49b06f2462466349b3261061
1 (*
2 * Copyright (c) 2018, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
8 *)
10 [@@@warning "-33"]
12 open Hh_prelude
14 [@@@warning "+33"]
16 open Ast_defs
17 open Aast
18 open Tast
20 let handler =
21 object
22 inherit Tast_visitor.handler_base
24 method! at_expr env =
25 function
26 | (_, p, Binop { bop = (Eqeqeq | Diff2) as bop; lhs; rhs }) ->
27 Tast_env.assert_nontrivial p bop env (get_type lhs) (get_type rhs)
28 | _ -> ()
29 end