I had a Scala class as follows:
class ClassA(val name: String) {
println("this is a class")
}
now I have this class:
class ClassA() {
println("this is a class")
}
in my main I used to declare the class like this:
val s = new ClassA("hello")
now I declare it like this:
val s = new ClassA
The issue is that before everything worked fine, but when I remove the name parameter from the object I still get this error:
error: not enough arguments for constructor ClassA: (name: String)ClassA.
Unspecified value parameter name.
It seems like the class is not compiling, but I recompiled everything. Is there a way I can clear out all old compile data and start fresh?
I read this document http://www.scala-lang.org/node/166 and realized that in scala you run the class not the file. So, I was just running the regular file x.scala instead i needed to run Main