Allow messages to nil.

That is, [nil message];. I just found out this is "perfectly legal"
(http://www.otierney.net/objective-c.html).
This commit is contained in:
Bill Currie 2012-12-17 18:59:45 +09:00
parent f1b1822528
commit b9c5769e6d

View file

@ -2818,6 +2818,8 @@ message_expr (expr_t *receiver, keywordarg_t *message)
class_msg = 1;
receiver = new_symbol_expr (class_pointer_symbol (class));
}
} else if (receiver->type == ex_nil) {
convert_nil (receiver, &type_id);
}
rec_type = get_type (receiver);