Here's Haskell's answer:
Prelude> \ a b -> a == b && b == 5 && a == "foo"
No instance for (Num [Char]) arising from the literal `5'
Possible fix: add an instance declaration for (Num [Char])
In the second argument of `(==)', namely `5'
In the first argument of `(&&)', namely `b == 5'
In the second argument of `(&&)', namely `b == 5 && a == "foo"'
You're asking about implicit conversions, which are an undisputable evil. However, attempting to provide answers to invalid questions also isn't very good.
You may have already seen the rather entertaining Wat talk, by Gary Bernhardt: https://www.destroyallsoftware.com/talks/wat
The central theme of this talk is not just implicit conversions — it's surprising answers to invalid questions. A much better way to handle an invalid question is to reject it as early as possible — Fail Fast. With a static type system, this can be very early indeed.