Syntax for calling super

David Holmes david.holmes at oracle.com
Wed Aug 22 18:28:28 PDT 2012


On 23/08/2012 11:09 AM, Brenden Towey wrote:
> On 8/22/2012 3:32 PM, Yuval Shavit wrote:
>> To my mind, the syntax "should" be K.m() (without the super). That makes
>
>
> I'd tend to agree, except for the problems you mention.  What about
> "J.super.m()"?  "Don't call me call my parent class?"
>
> interface J extends K {
>      int m() default { return J.super.m(); }  // calls J's parent's m()
> }

The problem with that is that you need to be able to select from 
multiple parents, so the parent's type has to be in there somewhere.

David


More information about the lambda-dev mailing list