Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323862 - base constructor call can not be used as an expression
Summary: base constructor call can not be used as an expression
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.7.1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-27 14:47 EDT by Stephan Herrmann CLA
Modified: 2010-09-23 11:06 EDT (History)
0 users

See Also:


Attachments
fix (119.80 KB, patch)
2010-08-27 17:32 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-08-27 14:47:46 EDT
According ot OTJLD 2.4.2(c) a base constructor call can be used as
an expression (argument to another constructor invocation):
   super(base(args));
However, currently the compiler reports a syntax error on token "base".

Witness is test236_constructorWithBasecall5.
Comment 1 Stephan Herrmann CLA 2010-08-27 17:32:42 EDT
Created attachment 177652 [details]
fix

This patch updates the grammar to support base constructor calls
as expressions. Additional checks are performed to detect illegal
use of a base constructor expression outside the explicit super
or this call.
Comment 2 Stephan Herrmann CLA 2010-08-27 17:37:55 EDT
Patch has been committed as r744 / r745.
Comment 3 Stephan Herrmann CLA 2010-09-23 11:06:12 EDT
Verified using I201009211735