| Summary: | [Xtend] Parameter annotations getting lost during code generation | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Sven-Torben Janus <janus> |
| Component: | Core | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sven.efftinge |
| Version: | 2.2.0 | Flags: | sven.efftinge:
juno+
|
| Target Milestone: | M5 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
was fixed in M5 Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
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; } }