Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/uncurried_expected.res:2:15-22

1 │ let apply = (f) => f(. 1)
2 │ let z = apply(x => x+1)
3 │

This expression is expected to have an uncurried function
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
let apply = (f) => f(. 1)
let z = apply(x => x+1)
4 changes: 0 additions & 4 deletions jscomp/ml/typecore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3755,10 +3755,6 @@ let report_error env ppf = function
fprintf ppf "it should have type@ %a"
type_expr ty
end else begin
match ty with
| {desc = Tconstr (Pdot (Pdot(Pident {name = "Js"},"Fn",_),_,_),_,_)} ->
fprintf ppf "This expression is excpeted to have an uncurried function"
| _ ->
fprintf ppf "This expression should not be a function,@ ";
fprintf ppf "the expected type is@ %a"
type_expr ty
Expand Down
2 changes: 1 addition & 1 deletion jscomp/super_errors/super_typecore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ let report_error env ppf = function
type_expr ty
end else begin
match ty with
| {desc = Tconstr (Pdot (Pdot(Pident {name = "Js"},"Fn",_),_,_),_,_)} ->
| {desc = Tconstr (Pident {name = "function$"},_,_)} ->
fprintf ppf "This expression is expected to have an uncurried function"
| _ ->
fprintf ppf "@[This expression should not be a function,@ ";
Expand Down