Can someone clarify a confusing point for me.
If I declare an object
X extending class
C, and I declare a case class
Y extending class
C, which classes and objects are defined.
Is there a class
X of which the
X object is an instance, and is there an object
Y of class
This is confusing because the
List object is not of class
List as far as I understand.
However, in the example above, as I understand the object
X has type
X and is guaranteed to be the only object with type
Also as I understand
case class in the example above defines a companion object
Y of the same name as the class. Does that object also have type
I realized I don’t understand this when I tried to explain it to a non-Scala user.