Menu

#28 Calling methods on super()

closed-fixed
5
2004-01-08
2004-01-07
No

This code:

StringList v = (StringList)super.clone();

generates this exception:

Semicolon expected after local variable declarator

Discussion

  • Arno Unkrig

    Arno Unkrig - 2004-01-08
    • status: open --> closed-fixed
     
  • Arno Unkrig

    Arno Unkrig - 2004-01-08

    Logged In: YES
    user_id=865893

    After a parenthesised expression, the parser looks at the
    following token to decide whether this is a type cast like

    (SomeType) x

    or a "normal" parenthesized expression like

    (a.b) + x

    "super" and "new" were missing from the set of tokens that
    identify the preceeding parenthesized expression as a type cast.

     

Log in to post a comment.

MongoDB Logo MongoDB