有人可以告诉我如何避免下面代码块中的警告:
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)
^