Are you using the latest released (or pre-released, a.k.a. "next") version?
[X] I'm using the latest Tact version
Tact source code
// The same happens if Bool is changed for Int
fun throwException(): Bool {
throw(4);
}
contract Test {
get fun testGetter(): Bool {
return throwException();
}
}
Relevant Tact/build system log output
> Test: func compiler
Func compilation error: /.../test_Test.code.fc:20:1: error: previous function return type int
cannot be unified with implicit end-of-block return type (): cannot unify type () with int.
The relevant generated FunC code is this:
int $global_throwException() impure inline_ref {
throw(4);
}
(tuple, int) $Test$_fun_testGetter(tuple $self) impure inline_ref {
var ($self) = $self;
var $fresh$ret_0 = $global_throwException();
return ($self, $fresh$ret_0);
}
What happened?
In the FunC code, is the error saying that the implicit return type () in function $global_throwException() does not match its return type, which is int?
Are you using the latest released (or pre-released, a.k.a. "next") version?
Tact source code
Relevant Tact/build system log output
The relevant generated FunC code is this:
What happened?
In the FunC code, is the error saying that the implicit return type
()
in function$global_throwException()
does not match its return type, which isint
?What did you expect?
No compilation error.
Steps to reproduce
No response
How do you run Tact?
No response
Anything else?
No response