Community
Participate
Working Groups
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; } }
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