Bug 412289 - Extending a inner, none-static Java class leads to syntactically correct Xtend file but errorneous generated Java class
Summary: Extending a inner, none-static Java class leads to syntactically correct Xten...
Status: NEW
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.4.2   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 435026 (view as bug list)
Depends on: 427279
Blocks:
  Show dependency tree
 
Reported: 2013-07-04 06:32 EDT by Robert Walter CLA
Modified: 2016-06-10 05:56 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Walter CLA 2013-07-04 06:32:27 EDT
I tried to subclass the type "org.eclipse.xtext.ui.editor.templates.DefaultTemplateProposalProvider.FollowElementAcceptor" which is defined as an inner, non-static class using Xtend, like this:

class CustomFollowElementAcceptor extends FollowElementAcceptor {
	new(Collection<TemplateContextType> result) {
		super(result)
	}
}

Xtend does not show me any problems, though the generated Java file does trying to call the super-constructor (since its actually wrong to do this):
"No enclosing instance of type DefaultTemplateProposalProvider is available due to some intermediate constructor invocation"
Comment 1 Jan Koehnlein CLA 2013-07-04 09:28:53 EDT
We should add a validation rule, as long as we don't support inner classes.
Comment 2 Sven Efftinge CLA 2014-05-16 04:55:20 EDT
*** Bug 435026 has been marked as a duplicate of this bug. ***
Comment 3 Sebastian Zarnekow CLA 2015-02-24 13:41:05 EST
Unfortunately out of scope for 2.8 - since we propagate Java errors to Xtend, it's not a big issue wrt to the missing validation.