Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350932 - [Xbase/Xtend] Illegal code generated for inferred return types
Summary: [Xbase/Xtend] Illegal code generated for inferred return types
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-01 08:56 EDT by Stephane Barbey CLA
Modified: 2017-09-19 17:56 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Barbey CLA 2011-07-01 08:56:31 EDT
Build Identifier:  I20110613-1736

The following Xtenc class:

package gub
class Buggy {
	def buggy() {
		if (true) return false;
	}	
}

generated the following Java code:

package gub;


@SuppressWarnings("all")
public class Buggy {
  
  public Boolean buggy() {
    Object _xifexpression = null;
    if (true) {
      return false;
    }
    return _xifexpression;
  }
}

which is illegal because _xifexpression is not a Boolean.



Reproducible: Always
Comment 1 Sebastian Zarnekow CLA 2011-07-18 15:28:40 EDT
Pushed to master.
Comment 2 Karsten Thoms CLA 2017-09-19 17:45:38 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:56:38 EDT
Closing all bugs that were set to RESOLVED before Neon.0