Skip to content

Commit dfc68f5

Browse files
committed
improver the error message ocaml#4414
1 parent c553931 commit dfc68f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

typing/typecore.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5066,6 +5066,10 @@ let report_error env ppf = function
50665066
fprintf ppf "it should have type@ %a"
50675067
type_expr ty
50685068
end else begin
5069+
match ty with
5070+
| {desc = Tconstr (Pdot (Pdot(Pident {name = "Js"},"Fn",_),_,_),_,_)} ->
5071+
fprintf ppf "This expression is excpeted to have an uncurried function"
5072+
| _ ->
50695073
fprintf ppf "This expression should not be a function,@ ";
50705074
fprintf ppf "the expected type is@ %a"
50715075
type_expr ty

0 commit comments

Comments
 (0)