These are terrible. Not because they don't test knowledge of scala, but because language trivia is a terrible way to identify a quality candidate.
do {...} while ((line = file.read()) != 0)
which one no longer understands after a week away from the language robs you of a short-term mental model of the language's quirks and evaluation strategies and what-have-you.