You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Scala 2.9.0, the following code compiles when entering it in the REPL using :paste mode. However, saving it into a file and loading it in the REPL using :load, gives an error:
scala>:load A.scala
LoadingA.scala...
defined classA
<console>:8:error: too many arguments for method apply: (i: Int)A in objectAdefapply(i: Int):A=A(i, i)
It looks like the lines in the file are loaded and interpreted one by one, which for companion object does not work in the in the REPL. It would be nice if this would work as well.
The text was updated successfully, but these errors were encountered:
Using Scala 2.9.0, the following code compiles when entering it in the REPL using :paste mode. However, saving it into a file and loading it in the REPL using :load, gives an error:
It looks like the lines in the file are loaded and interpreted one by one, which for companion object does not work in the in the REPL. It would be nice if this would work as well.
The text was updated successfully, but these errors were encountered: