|
|
@@ -44,7 +44,7 @@ let type2str_error = function
|
|
|
|
|
|
let check_type ?(msg="") expected node =
|
|
|
let got = typeof node in
|
|
|
- if expected <> Unknown & got <> Unknown & (spec got) <> (spec expected)
|
|
|
+ if expected <> Unknown && got <> Unknown && (spec got) <> (spec expected)
|
|
|
then begin
|
|
|
let msg = match msg with
|
|
|
| "" -> sprintf "type mismatch: expected type %s, got %s"
|
|
|
@@ -68,7 +68,7 @@ let op_result_type opnd_type = function
|
|
|
(* Check if the given operator can be applied to the given type *)
|
|
|
let check_type_op allowed_types desc node =
|
|
|
let got = typeof node in
|
|
|
- if got <> Unknown & not (List.mem got allowed_types)
|
|
|
+ if got <> Unknown && not (List.mem got allowed_types)
|
|
|
then
|
|
|
[NodeMsg (node, sprintf
|
|
|
"%s cannot be applied to type %s, only to %s"
|