Some people love asking interview questions where they don't state all the requirements, so I suppose the idea is to see if the candidate can discover the "hidden criteria".
This also makes more sense in a language where number types need manual casting.
This also makes more sense in a language where number types need manual casting.