+added a warning when a "tostring" meta method didn't return a string.

This commit is contained in:
paladin-t 2016-04-05 10:51:49 +08:00
parent dd9fed3692
commit da2d8f1251
3 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,6 @@
Apr. 5 2016
Added a warning when a "tostring" meta method didn't return a string
Mar. 29 2016
Added a help option to the shell

View File

@ -15276,6 +15276,8 @@ _print:
val_ptr->data.string = mb_strdup(val_ptr->data.string, strlen(val_ptr->data.string) + 1);
val_ptr->ref = false;
mb_make_nil(s->running_context->intermediate_value);
} else {
_handle_error_on_obj(s, SE_RN_STRING_EXPECTED, s->source_file, DON(ast), MB_FUNC_WARNING, _exit, result);
}
obj = val_ptr;
got_tostr = true;

Binary file not shown.