Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369336 - [Xtend] Parameter annotations getting lost during code generation
Summary: [Xtend] Parameter annotations getting lost during code generation
Status: CLOSED FIXED
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.2.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-22 13:08 EST by Sven-Torben Janus CLA
Modified: 2017-09-19 17:41 EDT (History)
1 user (show)

See Also:
sven.efftinge: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven-Torben Janus CLA 2012-01-22 13:08:13 EST
Build Identifier: 2.2.1 (on Eclipse Version: 3.7.1 Build id: M20110909-1335)

When annotating method parameters, the annotations are not transferred to the generated code.

As it can be seen in the example in "Steps to Reproduce" section, parameter annotations (@Named("foo") and  @Named("bar") are not present in the generated code while method annotations are transferred correctly (cf. @Inject).

Reproducible: Always

Steps to Reproduce:
1.
Create a new Xtend class with the following contents:

-- Xtend class --

package test
import com.google.inject.name.Named
import com.google.inject.Inject
class Test {
	@Inject
	new(@Named("foo") Object foo) {}
	@Inject
	def bar(@Named("bar") Object bar) ''''''
}


2.
Save and check generated source, which looks like this:

-- Java class --

package test;

import com.google.inject.Inject;
import org.eclipse.xtend2.lib.StringConcatenation;

@SuppressWarnings("all")
public class Test {
  @Inject
  public Test(final Object foo) {
  }
  
  @Inject
  public CharSequence bar(final Object bar) {
    StringConcatenation _builder = new StringConcatenation();
    return _builder;
  }
}
Comment 1 Sven Efftinge CLA 2012-01-31 05:39:07 EST
was fixed in M5
Comment 2 Karsten Thoms CLA 2017-09-19 17:30:33 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:41:48 EDT
Closing all bugs that were set to RESOLVED before Neon.0