Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364957 - [Xtend] wrong error message for explicitly calling non-existent constructor
Summary: [Xtend] wrong error message for explicitly calling non-existent constructor
Status: CLOSED FIXED
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.2.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: M6   Edit
Assignee: Jan Koehnlein CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 376037
Blocks:
  Show dependency tree
 
Reported: 2011-11-28 09:34 EST by Moritz Eysholdt CLA
Modified: 2017-10-31 11:00 EDT (History)
4 users (show)

See Also:
sven.efftinge: juno+
sebastian.zarnekow: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.