Below is the code snippet...a bit testing mode code snippet.I am trying to create a method through which i can change the return type.
While calling the method i am getting the exception "class type expected object found"
trait A
trait B extends A {
def aba[T](a:Int):T
}
class D
class C extends B {
def aba[D](a:Int) = {
println("asasas")
new D
}
}