的我有一個像下面名稱衝突,因爲同一消失
public interface IDrawerItem<T, VH extends RecyclerView.ViewHolder> extends IItem<T, VH>, IExpandable<T, IDrawerItem>, ISubItem<IDrawerItem, IDrawerItem> {
void bindView(VH holder, List payloads);
}
林的接口收到以下錯誤
Error:(44, 10) error: name clash: bindView(VH#1,List) in IDrawerItem and bindView(VH#2,List) in IItem have the same erasure, yet neither overrides the other where VH#1,VH#2 are type-variables: VH#1 extends ViewHolder declared in interface IDrawerItem VH#2 extends ViewHolder declared in interface IItem
爲什麼會這樣呢?
在其中一個超接口中聲明瞭「bindView」方法嗎?你想覆蓋它或超載嗎? – khelwood
我試圖覆蓋它 –
你只能覆蓋實現。 – khelwood