Generics with Generic Parameters and Abstract class

前端 未结 4 406
不思量自难忘°
不思量自难忘° 2020-12-03 14:03

I\'ve got two generic base classes. The second generic class has a constraint on its parameter of the first class.

abstract class FirstClass {...}
         


        
4条回答
  •  眼角桃花
    2020-12-03 14:41

    If you are actually using the generic type arguments to FirstClass (as, from your edit, it sounds like you are), then no, what you're looking for is unfortunately not possible. The compiler does not differentiate between type arguments that are related and those that are not.

提交回复
热议问题