I decided to try extension methods in the REPL, but I can’t seem to get even the simplest example working. What am I doing wrong here with this trivial example?
Welcome to Scala 3.4.0 (17.0.7, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> extension(i: Int)
| def sqr = i * i
-- Error: ----------------------------------------------------------------------------------------------------
4 |def sqr = i * i
|^^^
|Extension without extension methods