call-by-reference handling with a true multidimensional map

This commit is contained in:
2020-04-04 17:40:56 +00:00
parent 82eac76de4
commit ca1877d412
2 changed files with 74 additions and 71 deletions

View File

@ -2503,6 +2503,7 @@ int hawk_rtx_setrefval (hawk_rtx_t* rtx, hawk_val_ref_t* ref, hawk_val_t* val)
case HAWK_VAL_REF_GBLIDX:
case HAWK_VAL_REF_LCLIDX:
case HAWK_VAL_REF_ARGIDX:
#if !defined(HAWK_ENABLE_GC)
if (vtype == HAWK_VAL_MAP)
{
/* an indexed variable cannot be assigned a map.
@ -2510,6 +2511,7 @@ int hawk_rtx_setrefval (hawk_rtx_t* rtx, hawk_val_ref_t* ref, hawk_val_t* val)
hawk_rtx_seterrnum (rtx, HAWK_NULL, HAWK_EMAPTOIDX);
return -1;
}
#endif
/* fall through */
default: