Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366293 - [Xtend2.2] While loop with try/catch and rethrow produces illegall Java code.
Summary: [Xtend2.2] While loop with try/catch and rethrow produces illegall Java code.
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-10 05:31 EST by Ingo Meyer CLA
Modified: 2017-09-19 17:30 EDT (History)
1 user (show)

See Also:
sven.efftinge: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Meyer CLA 2011-12-10 05:31:16 EST
Build Identifier: 

A while loop where its expression always returns and not loops will produce illegal code.
In my language I introduced the "break" and "continue" keywords together with a endless loop "while (true) ...", but my example works in any Xtend file.

Reproducible: Always

Steps to Reproduce:
1. use snippet:
	def void whileLoopTest () {		
		var s = 'Test'
		while (true)
			try {
				s = s + ' failed'
				return
			}
			catch (Exception ex)
			{
				throw ex
			}	
	}
Comment 1 Sven Efftinge CLA 2011-12-12 02:41:52 EST
pushed to master
Comment 2 Karsten Thoms CLA 2017-09-19 17:19:12 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:30:43 EDT
Closing all bugs that were set to RESOLVED before Neon.0