有人可以告诉我如何在下面的代码块中避免警告:
abstract class Foo[T <: Bar]{ case class CaseClass[T <: Bar](t: T) def method1 = { case CaseClass(t: T) => println(t) csse _ => } }
这会导致编译器警告:
abstract type pattern T is unchecked since it is eliminated by erasure case CaseClass(t: T) => println(t) ^