mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 17:51:09 +07:00
16 lines
544 B
Java
16 lines
544 B
Java
|
|
interface Car {}
|
|
interface Ferrari extends Car {}
|
|
interface ICarRepairShop<C extends Car> {
|
|
void repair(C car);
|
|
}
|
|
class AbstractCarRepairShop<C extends Car> implements ICarRepairShop<C> {
|
|
@Override
|
|
public void repair(Car car) { }
|
|
}
|
|
|
|
<error descr="'repair(C)' in 'ICarRepairShop' clashes with 'repair(Car)' in 'AbstractCarRepairShop'; both methods have same erasure, yet neither overrides the other">class FerrariRepairShop extends AbstractCarRepairShop<Ferrari></error> {
|
|
@Override
|
|
public void repair(Ferrari car) {
|
|
}
|
|
} |