I'm kinda new to scala. I got into trouble while trying to return object type.
Here is the code.
It shows "error: not found: type A"
object A{}
object B {
def getInstance() : A = {
return A
}
}
If I do similar kind of thing with class instance, it wont show any problem.
class A{}
object B {
def getInstance() : A = {
return new A
}
}
As far as I know object type is a singleton instance of class. What am I missing here?