Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323862

Summary: base constructor call can not be used as an expression
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7   
Target Milestone: 0.7.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix none

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