| Summary: | [Xtend] Regression in type inference | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Sven Efftinge <sven.efftinge> |
| Component: | Core | Assignee: | Project Inbox <xtend-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | 2.2.0 | Flags: | sven.efftinge:
juno+
|
| Target Milestone: | M6 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
List<? extends Object> is inferred which looks good to me. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
The following code results in incorrect Java code. The inferred return type of the last method is Object, but should be List<?>. Since this involves recursion an error marker requiring declaration of return types would be appropriate too. class Case_6 { def dispatch transform(EPackage packageDecl) { packageDecl.eContents.map(e | transform(e as EStructuralFeature)) } def dispatch transform(EStructuralFeature entity) { val inferredType = null newArrayList(inferredType as EObject) } def dispatch transform(EClass model) { model.ETypeParameters.map(e| transform(e)) } }