How to rectify? — “both define getObjectCopy(), but with unrelated return types” — but it's *one* function

前端 未结 2 419
执笔经年
执笔经年 2021-01-26 05:08

I have the following interface heirarchy (with all non-relevant functions stripped out). I am getting this error when trying to compile it:

types ValidLineGettable

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-26 05:54

    The Eclipse compiler compiles your code without errors. JavaC from JDK 7 (1.7.0_45) and JDK 8 (1.8.0-ea) also work.

    I think this is a bug in the JDK, most likely one related to bug #122881 (please note this one is fixed). I also found an issue in Google Protocol Buffer that points to another bug, but I can't find that one.

    You could compile it with Eclipse or JDK 7, or change the code so that it doesn't require this feature.

提交回复
热议问题