This error is when using :paste command on scala

scala

#1

scala> :paste
// Entering paste mode (ctrl-D to finish)
1+2
println(“hello world”)
// Exiting paste mode, now interpreting.
:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
1+2
^
hello world


#2

U can add 1+2 by using parentheses like this “print(1+2)” in :paste mode. A pure expression does give an error for necessary requirement of parentheses

Regards,
Sunil Abhishek