fork download
  1. abstract class A[T <: AnyRef : ClassManifest]{
  2. def whichClass: Class[_ <: T] = classManifest[T].erasure
  3. }
  4.  
  5.  
  6.  
  7. object Main{
  8. def main(args: Array[String]){
  9. println(B.whichClass)
  10. }
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.scala:2: error: type mismatch;
 found   : Class[(some other)_$1(in method whichClass)] where type (some other)_$1(in method whichClass)
 required: Class[_ <: T]
  def whichClass: Class[_ <: T] = classManifest[T].erasure
                                                   ^
one error found
stdout
Standard output is empty