| Summary: | Xtend2 generates a void _xblockexpression | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Serano Colameo <serano.colameo> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | moritz.eysholdt, sven.efftinge |
| Version: | unspecified | Flags: | sven.efftinge:
indigo+
|
| Target Milestone: | RC1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
workaround: remove "return" keyword and xtend generates correct statements *** Bug 345458 has been marked as a duplicate of this bug. *** turned out to be a general problem with branching expressions (if, switch, try-catch) in cases where branches were mixing early exits (return, throw) and simple expressions. Fixed and pushed to master. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
Build Identifier: 2.0.0.v201105101404 public String toIdlFileName(final InterfaceDcl iface) { try { void _xblockexpression = null; // wrong block definition { .... Reproducible: Always Steps to Reproduce: 1. create an Xtend2 class 2. put this code snippet: def String toIdlFileName(InterfaceDcl iface) { try { val fileName = new File(iface.eResource.URI.toFileString).name if (fileName.contains('.')) return fileName.split('\\.').get(0) return fileName } catch (Exception ex) { return iface.name; } }