Skip to content

Commit 408008b

Browse files
committed
Remove errors for curried application of uncurried functions.
This is not an error anymore since the introduction of partial application in #5805 See: #5888
1 parent eb07cb5 commit 408008b

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

jscomp/ml/typecore.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3672,8 +3672,6 @@ let report_error env ppf = function
36723672
type_expr typ;
36733673
fprintf ppf "@ @[It is applied to too many arguments;@ %s@]@]"
36743674
"maybe you forgot a `;'."
3675-
| Tconstr (Pdot (Pdot(Pident {name = "Js"},"Fn",_),_,_),_,_) ->
3676-
fprintf ppf "This function has uncurried type, it needs to be applied in ucurried style";
36773675
| _ ->
36783676
fprintf ppf "@[<v>@[<2>This expression has type@ %a@]@ %s@]"
36793677
type_expr typ

jscomp/super_errors/super_typecore.ml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -202,19 +202,6 @@ let report_error env ppf = function
202202
type_expr typ;
203203
fprintf ppf "@ @[It only accepts %i %s; here, it's called with more.@]@]"
204204
acceptsCount (if acceptsCount == 1 then "argument" else "arguments")
205-
| Tconstr (
206-
(Path.Pdot (((Pdot (Path.Pident {name="Js"}, "Fn", _)) ), _, _)),
207-
_,
208-
_
209-
)
210-
->
211-
fprintf
212-
ppf
213-
"@[<v>This is an uncurried ReScript function. @{<info>It must be applied with a dot@}.@,@,\
214-
Like this: @{<info>foo(. a, b)@}@,\
215-
Not like this: @{<dim>foo(a, b)@}@,@,\
216-
This guarantees that your function is fully applied. More info here:@,\
217-
https://rescript-lang.org/docs/manual/latest/function#uncurried-function@]"
218205
| _ ->
219206
fprintf ppf "@[<v>@[<2>This expression has type@ %a@]@ %s@]"
220207
type_expr typ

0 commit comments

Comments
 (0)