Bug 445604 - semicolon surprisingly disallowed
Summary: semicolon surprisingly disallowed
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.8.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 458918
  Show dependency tree
 
Reported: 2014-10-01 04:31 EDT by Moritz Eysholdt CLA
Modified: 2016-09-10 01:08 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2014-10-01 04:31:39 EDT
The semicolon in 

class Foo {
	def String foo() {
		switch ("X") {
			case "Y": println("Z");
		}
	}
}


is surprisingly not allowed. Since Java allows one here, I think it should be allowed.
Comment 1 Sebastian Zarnekow CLA 2014-10-01 04:37:42 EDT
Semicolons are generally only allowed in block expressions. We could it allow in cases, too but it would break the XbaseGrammarAccess. If that is the only grammar change in 2.8, I'd say it's not worth it. If there are other changes, it would be safe to do this cosmetic change, too.
Comment 2 Sven Efftinge CLA 2015-02-02 03:38:59 EST
removed 2.8 schedule