Bug 23464 - ast: (Super)ConstructorInvocation should be wrapped in ExpressionStatement
Summary: ast: (Super)ConstructorInvocation should be wrapped in ExpressionStatement
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-12 05:50 EDT by Adam Kiezun CLA
Modified: 2002-09-19 11:00 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-09-12 05:50:35 EDT
class A{
  A{
    super();
  }
}

the call to super in not inside an ExpressionStatement (like any other method 
invocation)
and it does not include the trailing semicolon

it should not be a special case

(same for ConstructorInvocation)
Comment 1 Olivier Thomann CLA 2002-09-12 10:20:08 EDT
SuperConstructorInvocation and ConstructorInvocation are subclasses of
Statement. Therefore they don't need to be wrapped in an ExpressionStatement.
The bug is that the semi-colon is not included in the position, but not that it
is not wrapped in an ExpressionStatement.
Comment 2 Adam Kiezun CLA 2002-09-12 10:25:32 EDT
i got fooled by the javadoc - it should mention the semicolon too
Comment 3 Olivier Thomann CLA 2002-09-12 10:28:29 EDT
We need to fix the javadoc as well. It should not state that this is an
expression, but it is a statement.
Comment 4 Olivier Thomann CLA 2002-09-12 10:34:55 EDT
As soon as the new javadoc is released, I release a fix for it.
Comment 5 Olivier Thomann CLA 2002-09-12 13:03:09 EDT
Fixed and released in 2.1 stream.
Comment 6 David Audel CLA 2002-09-19 04:38:48 EDT
Verified.
Comment 7 Olivier Thomann CLA 2002-09-19 11:00:15 EDT
Regression test added (test0402).