New to scala world and for exercise , executed below lines of code in windows REPL. getting error Unit does not take parameters.Any idea on this.
scala> :paste
// Entering paste mode (ctrl-D to finish)
val x:Int = 10
println(x)
{
val x:Int =20
println(x)
}
println(x)
// Exiting paste mode, now interpreting.
<pastie>:14: error: Unit does not take parameters
{
^
scala>