No ClassTag available for MyClass.this.T for an abstract type

Viewed 3057

This works well

class MyClass[T<: Actor: ClassTag] extends Actor {
  //....
}

but this doesn't due to the error No ClassTag available for MyClass.this.T

class MyClass extends Actor {
  type T<: Actor
  //...
}

even when do the following:

class MyClass extends Actor {
  type T<: Actor: ClassTag //this doesn't even compile
  //...
}

How do I use an abstract type and get rid of the error?

1 Answers
Related