Scala passing type parameters to object
        Posted  
        
            by Shahzad Mian
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Shahzad Mian
        
        
        
        Published on 2010-04-07T14:58:25Z
        Indexed on 
            2010/04/07
            15:13 UTC
        
        
        Read the original article
        Hit count: 398
        
In Scala v 2.7.7
I have a file with
class Something[T] extends Other {
}
object Something extends OtherConstructor[Something] {
}
This throws the error:
class Something takes type parameters
object Something extends OtherConstructor[Something] {
However, I can't do this
object Something[T] extends OtherConstructor[Something[T]] { }
It throws an error:
error: ';' expected but '[' found.
Is it possible to send type parameters to object? Or should I change and simply use Otherconstructor
© Stack Overflow or respective owner