Closed yawaramin closed 8 months ago
Is this expected?
I guess so. Remember that the type of invalid_arg
is string -> 'a = <fun>
If you write
# invalid_arg "hello" 1;;
Warning 20 [ignored-extra-argument]: this argument will not be used by the function.
You get a warning but I guess the format4
type prevents it to trigger in Fmt
's case, it's not functional value.
Got it, thanks!
This does not cause a type error:
Is this expected?
Fmt.pr
shows a type error as I would expect: