Fix: compatibility check in RETURN statement

This commit is contained in:
ceriel 1996-06-06 07:37:02 +00:00
parent 740f1d5f75
commit 7f7f5f187f

View file

@ -854,6 +854,9 @@ WalkStat(nd, exit_label, end_reached)
assignment compatible with the result type of the assignment compatible with the result type of the
function procedure (See Rep. 9.11). function procedure (See Rep. 9.11).
*/ */
if (nd->nd_RIGHT->nd_symb == STRING) {
TryToString(nd->nd_RIGHT, func_type);
}
if (!ChkAssCompat(&(nd->nd_RIGHT), func_type, "RETURN")) { if (!ChkAssCompat(&(nd->nd_RIGHT), func_type, "RETURN")) {
break; break;
} }