[qfcc] Check receiver type a second type

The old "expr changed type to error" trick hasn't worked for a while, so
sending a message to an undefined class didn't end well.
This commit is contained in:
Bill Currie 2024-09-04 10:37:26 +09:00
parent 8db547afec
commit 3aab301d45

View file

@ -219,6 +219,11 @@ message_expr (const expr_t *receiver, keywordarg_t *message)
if (!rec_type) {
rec_type = get_type (receiver);
}
if (!rec_type) {
auto err = new_expr ();
err->type = ex_error;
return err;
}
if (receiver->type == ex_error)
return receiver;