Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342557 - [Xtend] Wrong return type in generated Java
Summary: [Xtend] Wrong return type in generated Java
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 08:36 EDT by Robert von Massow CLA
Modified: 2017-09-19 17:53 EDT (History)
2 users (show)

See Also:
sven.efftinge: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert von Massow CLA 2011-04-12 08:36:28 EDT
Build Identifier: 

The following Xtend function which clearly returns a boolean
	isInlineCode (CodeBlock cb) {
		return cb.contents.size == 1 && !cb.contents.head.toString.contains("\n");
	}

is translated to void:

  public void isInlineCode(final CodeBlock cb) {
    EList<EObject> _contents = cb.getContents();
    int _size = _contents.size();
    boolean _operator_equals = ObjectExtensions.operator_equals(((Object)_size), 1);
    EList<EObject> _contents_1 = cb.getContents();
    EObject _head = IterableExtensions.<EObject>head(_contents_1);
    String _string = _head.toString();
    boolean _contains = _string.contains("\n");
    boolean _operator_not = BooleanExtensions.operator_not(_contains);
    boolean _operator_and = BooleanExtensions.operator_and(_operator_equals, _operator_not);
    return _operator_and;
  }

Reproducible: Always
Comment 1 Sebastian Zarnekow CLA 2011-04-14 17:06:03 EDT
Pushed to master
Comment 2 Karsten Thoms CLA 2017-09-19 17:42:11 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:53:17 EDT
Closing all bugs that were set to RESOLVED before Neon.0