Closed anton-trunov closed 2 days ago
Consider the following Tact code:
message(1) Msg1 {} message(1) Msg2 {} contract Example { receive(msg: Msg1) { } receive(msg: Msg2) { } }
The message opcode clash results in the following incorrect FunC code that essentially ignores the Msg2 receiver.
Msg2
;; Parse incoming message int op = 0; if (slice_bits(in_msg) >= 32) { op = in_msg.preload_uint(32); } ;; Receive Msg1 message if (op == 1) { var msg = in_msg~$Msg1$_load(); self~$Example$_internal_binary_Msg1(msg); return (self, true); } ;; Receive Msg2 message if (op == 1) { var msg = in_msg~$Msg2$_load(); self~$Example$_internal_binary_Msg2(msg); return (self, true); }
Consider the following Tact code:
The message opcode clash results in the following incorrect FunC code that essentially ignores the
Msg2
receiver.