

The koan returns -3 because in Scala operators are methods and applying a method to a conditional automatically casts the return value of both branches to be of the same type. Since float has precedence over long, the long is cast to a float which causes it to lose precision and become 123456792. Then both the long and float are cast to a double, which has the highest precedence, in order to evaluate the subtraction method. The result is 123456789 - 123456792 = -3.
Работает для Scala 2.12.x, в 2.13.х уже не, хотя какая там разница. Проверено в REPL online.
Из доклада автора Jepsen https://t.me/oleg_fov/243 (буквально последние 30сек)