Evolving the wrapper classes
Dan Smith
daniel.smith at oracle.com
Fri Jun 19 20:20:26 UTC 2020
> On Jun 19, 2020, at 2:16 PM, Dan Smith <daniel.smith at oracle.com> wrote:
>
>> On Jun 19, 2020, at 1:51 PM, forax at univ-mlv.fr wrote:
>>
>> covariant return type
>> interface I {
>> int foo();
>> }
>> interface J {
>> Object foo();
>> }
>> class A implements I, J {
>> int foo();
>> }
>>
>> with I.java compiled a long time ago.
>
> Nothing in this proposal changes how these classes are compiled.
Oh wait, this would actually be a compiler error currently. So the fact that we allow it is new, but it works the same as other covariant override bridges. (The bridge *body* is a little different, because there's a I -> Object conversion needed.)
More information about the valhalla-spec-experts
mailing list