Super class method and Interface default method conflict resolution

后端 未结 3 2113
死守一世寂寞
死守一世寂寞 2020-12-03 11:27

Consider the below example,

public class Testing extends SupCls implements Intf {
    public static void main(String[] args) {
        new Testing().test();
         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-03 12:16

    This certainly is a bug in eclipse but in the code completion proposals rather than in the compiler. Hovering over the call to test or Open Declaration take you to the SupCls method and running the code correctly prints "From SupCls" which proves this. Please file a bug against jdt ui for investigation

提交回复
热议问题