Defender methods and reabstraction
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Thu Dec 2 02:00:39 PST 2010
> 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.
Maurizio
> Rémi
>
>
>
More information about the lambda-dev
mailing list