Issues with outcome printer and arity0#512
Conversation
Added a couple of examples.
| type arity0 = (.) => unit | ||
| type arity0b = (.) => int | ||
| type arity0c = Js.Fn.arity0<Js.Fn.arity0<array<int>>> | ||
| type arity0d = (. unit) => unit |
There was a problem hiding this comment.
This should be something like (. unit) => unit => unit
which btw is not currently possible anyway as it would currently format to (. unit, unit) => unit which is arity 2.
There was a problem hiding this comment.
Not sure currently there's even a syntax that can express the intended type: uncurried function that returns a curried function
There was a problem hiding this comment.
Possibly related rescript-lang/rescript#5395
so there might be something wrong already in the compiler when dealing with this case.
That, or there's something wrong just in error reporting (still in the compiler).
There was a problem hiding this comment.
After the patch this is now (.) => unit => unit which is still not quite rights as it currently means (. unit, unit) => unit after formatting.
But that's a bigger change for another PR.
Patch from @IwanKaramazow
Added a couple of examples.