Why are generics completely disabled when you ignore a parameter type?

后端 未结 2 1297
伪装坚强ぢ
伪装坚强ぢ 2020-12-20 03:03

As a followup to this question, first the background

Given a class with this declaration:

public class SomeClass

And a sub

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-20 03:23

    It's a weird one. It seems, though, you could always get rid of the error without introducing any problems by extending SomeClass instead of SomeClass:

    public class SomeSubClass extends SomeClass {
        ...
    }
    
        

    提交回复
    热议问题