Closed
Description
After changing to the new representation of uncurried functions (#5870) there are a few places in the codebase that used to generate error messages for which there were no tests:
- 1
fprintf ppf "This function has uncurried type, it needs to be applied in ucurried style"
inTypecore
. Same as 3, and overridden inSuper_typecore
. - 2
fprintf ppf "This expression is excpeted to have an uncurried function"
inTypecore
. Same as 4 but misspelled and overridden inSuper_typecore
. - 3
This is an uncurried ReScript function. @{<info>It must be applied with a dot@}.@
inSuper_typecore
Remove errors for curried application of uncurried functions. #5890
let foo = (. x, y) => x+1
let z = foo( 1)
- 4
fprintf ppf "This expression is expected to have an uncurried function"
inSuper_typecore
Restore error where uncurried type is expected. #5891
let apply = (f) => f(. 1)
let z = apply(x => x+1)
- 5 The internal representation of uncurried types can escape Uncurried internal representation escapes in error message. #5892
let nonfun = 2
let _ = nonfun(. 3)
Old error:
This has type: int
Somewhere wanted: Js.Fn.arity1<'a>
New error:
This has type: int
Somewhere wanted: \"function$"<'a, [#Has_arity1]>
Metadata
Metadata
Assignees
Labels
No labels