Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358418

Summary: [Xtend] Method with generic type is compiled wrong
Product: [Modeling] TMF Reporter: Ingo Meyer <ingo.meyer>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: unspecifiedFlags: sebastian.zarnekow: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Ingo Meyer CLA 2011-09-21 09:58:24 EDT
Build Identifier: 20110609-2236

The following method will be wrong in Java:

	/**
	 * 
	 */
	def <T> Iterable<T> nullSafe (Iterable<T> elements) {
		if (elements == null)
			newArrayList
		else
			elements
	}

I use Xtext 2.0.1.v201108151710

Reproducible: Always
Comment 1 Sebastian Zarnekow CLA 2011-09-28 09:47:31 EDT
Pushed to master.
Comment 2 Karsten Thoms CLA 2017-09-19 18:06:45 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 18:16:26 EDT
Closing all bugs that were set to RESOLVED before Neon.0