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

Bug 364957

Summary: [Xtend] wrong error message for explicitly calling non-existent constructor
Product: [Tools] Xtend Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: CoreAssignee: Jan Koehnlein <jan>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dennis.huebner, jan, sebastian.zarnekow, sven.efftinge
Version: 2.2.0Flags: sven.efftinge: juno+
sebastian.zarnekow: kepler+
Target Milestone: M6   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Bug Depends on: 376037    
Bug Blocks:    

Description Moritz Eysholdt CLA 2011-11-28 09:34:45 EST
Example 1:
---
class bar {	
	new() {
		this(true)
	}	
}
---

Example 2:
---
class foo extends bar {
	new() {
 		super(true)
 	}
}
---

In both cases the error message is "Cannot access local variable bar with parentheses". 

A message such as "Constructor with parameters (Boolean) could not be found" would be more appropriate.
Comment 1 Dennis Huebner CLA 2013-02-14 03:49:06 EST
Still an issue IMHO.

With Example 1:

marker:
Multiple markers at this line
- Invalid number of arguments. Expected bar
- Recursive constructor invocation

Quick fix:
- Change to this (twice)


With Example 2:

marker:
- Invalid number of arguments. Expected bar

Quick fix:
- Change to super (twice)

Java says:
Example 1:
- The constructor bar(boolean) is undefined
Example 2:
- The constructor bar(boolean) is undefined
Comment 2 Jan Koehnlein CLA 2013-02-19 11:44:52 EST
Fixes pushed to gerrit.

- Quickfixes that don't change the code are filtered
- Error messages have been improved
Comment 3 Eclipse Webmaster CLA 2017-10-31 10:49:02 EDT
Requested via bug 522520.

-M.
Comment 4 Eclipse Webmaster CLA 2017-10-31 11:00:05 EDT
Requested via bug 522520.

-M.