Defender methods and reabstraction

Rémi Forax forax at
Thu Dec 2 02:11:49 PST 2010

  Le 02/12/2010 11:00, Maurizio Cimadamore a écrit :
>> I don't understand your point, here.
>> The spec already says that if X implements A and B and B extends A, then
>> only default methods from B should be considered.
> To some extent you are right, the spec already considers case in which 
> a default overrides another. However it is not crystal clear what 
> should happen when you have A<:B, where A provides a default and B 
> does not (re-abstracted). In this case, since there's no default in B, 
> the spec seems to suggest that the default in A should be considered, 
> which is in contrast with standard overriding rules. The solution is 
> to throw re-asbtracted method into the picture and to deal with them 
> as if they were default methods where the default impl is unspecified. 
> Then the spec text follows cleanly.

"... as if they were default methods where the default impl is 
unspecified ..."
javac perhaps need something like that but in my opinion this too 
implementation specific for a spec.

Interface contains abstract methods and methods with a default method.
An abstract method can override an abstract method or a default method
and vice-versa.

> Maurizio
>> Rémi


More information about the lambda-dev mailing list