Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356071 - [Xtend] Incomplete return statement
Summary: [Xtend] Incomplete return statement
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-29 09:06 EDT by Serano Colameo CLA
Modified: 2017-09-19 17:15 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 Serano Colameo CLA 2011-08-29 09:06:39 EDT
Build Identifier: Xtext 2.0.1

Xtend2:
	def dispatch EObject getField(Iterable<EObject> features, String fName) {
==>		if (!features.nullOrEmpty) return
		val fields = getFeatures(features.filter(typeof(Attribute)).filter(typeof(EObject)), fName)
		if (!fields.nullOrEmpty) return fields.head
		val map = getMap(features.filter(typeof(Mapping)), fName)
		if (map != null) map.type
	}


Java:
 protected EObject _getField(final Iterable<EObject> features, final String fName) {
    EObject _xblockexpression = null;
    {
      boolean _isNullOrEmpty = IterableExtensions.isNullOrEmpty(features);
      boolean _operator_not = BooleanExtensions.operator_not(_isNullOrEmpty);
      if (_operator_not) {
bug ==>        return; 
      }
      Iterable<Attribute> _filter = IterableExtensions.<Attribute>filter(features, com.csg.cs.tools.mdgen.icm.icmDsl.Attribute.class);



Reproducible: Always

Steps to Reproduce:
1.see details
2.
3.
Comment 1 Sebastian Zarnekow CLA 2011-09-28 11:46:08 EDT
A validation rule is missing here.
Comment 2 Sven Efftinge CLA 2011-10-12 11:11:28 EDT
pushed to master
Comment 3 Karsten Thoms CLA 2017-09-19 17:03:49 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:15:36 EDT
Closing all bugs that were set to RESOLVED before Neon.0