Skip to content

Commit 24b88ed

Browse files
committed
fix resultexpr calculation for structs
1 parent 4ac7a71 commit 24b88ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,11 +1095,11 @@ doDeclareFunction(AST *funcblock)
10951095
} else {
10961096
AST *resultexpr = src->right;
10971097
AST *type = NULL;
1098-
fdef->resultexpr = resultexpr;
10991098
if (resultexpr->kind == AST_DECLARE_VAR) {
11001099
fdef->overalltype->left = type = resultexpr->left;
11011100
resultexpr = resultexpr->right;
11021101
}
1102+
fdef->resultexpr = resultexpr;
11031103
if (resultexpr->kind == AST_IDENTIFIER) {
11041104
AddSymbolPlaced(&fdef->localsyms, resultexpr->d.string, SYM_RESULT, type, NULL, resultexpr);
11051105
} else if (resultexpr->kind == AST_LISTHOLDER) {

0 commit comments

Comments
 (0)