diff --git a/plugins/org.eclipse.n4js.model/emf-gen/org/eclipse/n4js/n4JS/ArrowFunction.java b/plugins/org.eclipse.n4js.model/emf-gen/org/eclipse/n4js/n4JS/ArrowFunction.java
index 7a39167fa1..3ffb474761 100644
--- a/plugins/org.eclipse.n4js.model/emf-gen/org/eclipse/n4js/n4JS/ArrowFunction.java
+++ b/plugins/org.eclipse.n4js.model/emf-gen/org/eclipse/n4js/n4JS/ArrowFunction.java
@@ -96,6 +96,9 @@ public interface ArrowFunction extends FunctionExpression {
* *
* If {@link #isSingleExprImplicitReturn()} returns true
, this method will return the single expression
* that makes up the body of this arrow function, otherwise the behavior is undefined (might throw exception).
+ *
+ * In case of broken AST, this method may return null
even if {@link #isSingleExprImplicitReturn()}
+ * returns true
.
*
* @model kind="operation" unique="false"
* annotation="http://www.eclipse.org/emf/2002/GenModel body='<%org.eclipse.n4js.n4JS.Statement%> _head = <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%org.eclipse.n4js.n4JS.Statement%>>head(this.getBody().getStatements());\nreturn ((<%org.eclipse.n4js.n4JS.ExpressionStatement%>) _head).getExpression();'"
diff --git a/plugins/org.eclipse.n4js.model/model/N4JS.xcore b/plugins/org.eclipse.n4js.model/model/N4JS.xcore
index 282cdd868e..afeda61abf 100644
--- a/plugins/org.eclipse.n4js.model/model/N4JS.xcore
+++ b/plugins/org.eclipse.n4js.model/model/N4JS.xcore
@@ -619,6 +619,9 @@ class ArrowFunction extends FunctionExpression {
/**
* If {@link #isSingleExprImplicitReturn()} returns true
, this method will return the single expression
* that makes up the body of this arrow function, otherwise the behavior is undefined (might throw exception).
+ *
+ * In case of broken AST, this method may return null
even if {@link #isSingleExprImplicitReturn()}
+ * returns true
.
*/
op Expression getSingleExpression() {
return (body.statements.head as ExpressionStatement).expression;
diff --git a/plugins/org.eclipse.n4js/src/org/eclipse/n4js/postprocessing/PolyProcessor_FunctionExpression.xtend b/plugins/org.eclipse.n4js/src/org/eclipse/n4js/postprocessing/PolyProcessor_FunctionExpression.xtend
index 423292f337..b249e4ad45 100644
--- a/plugins/org.eclipse.n4js/src/org/eclipse/n4js/postprocessing/PolyProcessor_FunctionExpression.xtend
+++ b/plugins/org.eclipse.n4js/src/org/eclipse/n4js/postprocessing/PolyProcessor_FunctionExpression.xtend
@@ -270,10 +270,12 @@ package class PolyProcessor_FunctionExpression extends AbstractPolyProcessor {
}
// tweak return type
if (funExpr instanceof ArrowFunction) {
+ log(0, "===START of special handling of single-expression arrow function");
// NOTE: the next line requires the type of 'funExpr' and types of fpars to be in cache! For example:
// function