Skip to content

Commit

Permalink
Trigger partial app warning on Texp_send and Texp_new
Browse files Browse the repository at this point in the history
  • Loading branch information
nojb committed Nov 16, 2018
1 parent d4637b9 commit 78f34ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions typing/typecore.ml
Expand Up @@ -2021,11 +2021,11 @@ let check_partial_application statement exp =
| Texp_ident _ | Texp_constant _ | Texp_tuple _
| Texp_construct _ | Texp_variant _ | Texp_record _
| Texp_field _ | Texp_setfield _ | Texp_array _
| Texp_while _ | Texp_for _ | Texp_new _ | Texp_instvar _
| Texp_while _ | Texp_for _ | Texp_instvar _
| Texp_setinstvar _ | Texp_override _ | Texp_assert _
| Texp_lazy _ | Texp_object _ | Texp_pack _ | Texp_unreachable
| Texp_extension_constructor _ | Texp_ifthenelse (_, _, None)
| Texp_function _ | Texp_send _ ->
| Texp_function _ ->
check_statement ()
| Texp_match (_, cases, _) ->
List.iter (fun {c_rhs; _} -> check c_rhs) cases
Expand All @@ -2036,7 +2036,7 @@ let check_partial_application statement exp =
| Texp_let (_, _, e) | Texp_sequence (_, e)
| Texp_letexception (_, e) | Texp_letmodule (_, _, _, e) ->
check e
| Texp_apply _ ->
| Texp_apply _ | Texp_send _ | Texp_new _ ->
Location.prerr_warning exp_loc Warnings.Partial_application
end
in
Expand Down

0 comments on commit 78f34ef

Please sign in to comment.