Bug 23464

Summary: ast: (Super)ConstructorInvocation should be wrapped in ExpressionStatement
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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).