encore
encore copied to clipboard
Deep error when mixing forward and return
When compiled, the following program
active class Main
def foo(b : bool) : int
if b then
forward (this ! foo(b))
else
return this.foo(b)
end
end
def main() : unit
this.foo(false)
end
end
generates an error at the C compiler stage:
mini_src/Main.encore.c:290:5: error: void function '_enc__method__mini_Main_foo_async' should not
return a value [-Wreturn-type]
return _sync_method_call_3;
^ ~~~~~~~~~~~~~~~~~~~
1 error generated.
*** Compilation failed with exit code 1 ***