Your code works correctly if you place it inside a class or object because the class or object can overload methods in scala.
But if you write your code in REPL, these are not methods, but functions. And functions cannot be overloaded. So you have to put them inside an object or class or use the default options suggested by @StuartMcvean
. @Travis , , . , REPL ( ) - , .
(, ), , REPL , REPL , (, , )
:paste ( , ) -