tact icon indicating copy to clipboard operation
tact copied to clipboard

Sending empty message throws at FunC compilation

Open Tarnadas opened this issue 2 years ago • 2 comments

Hey,

if I try to send an empty message the FunC compiler throws a cryptic error message:

Func compilation error:...:184:14: error: previous function return type tuple cannot be unified with return statement expression type (): cannot unify type () with tuple

Example:

message MyMessage {
}

contract MyContract {
    receive("send") {
        send(SendParameters {
            to: context().sender, 
            value: 0, 
            bounce: false,
            mode: SendIgnoreErrors,
            body: MyMessage {}.toCell()
        });
    }
}

After investigating the Tact compiler output it was clear that the error was caused by the empty message.

Tarnadas avatar Oct 19 '23 08:10 Tarnadas

Hi, I am also facing a similar error and i have checked that there are no empty messages.

imsk17 avatar Mar 27 '24 21:03 imsk17

@imsk17 Could you please provide your Tact source code and the exact error message you see?

anton-trunov avatar Mar 28 '24 07:03 anton-trunov