Merge remote-tracking branch 'origin/GT-3319_SleighFunctionCall'

This commit is contained in:
Ryan Kurtz
2019-11-18 08:23:19 -05:00

View File

@@ -1246,7 +1246,17 @@ funcall returns [VectorSTL<OpTpl> value]
@init {
$Return::noReturn = true;
}
: e=expr_apply { $value = (VectorSTL<OpTpl>) e; }
: e=expr_apply {
if (e instanceof VectorSTL<?>)
$value = (VectorSTL<OpTpl>) e;
else {
Location loc = null;
if (e instanceof ExprTree) {
loc = ((ExprTree)e).location;
}
reportError(loc,"Functional operator requires a return value");
}
}
;
build_stmt returns [VectorSTL<OpTpl> ops]