Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep error when mixing forward and return #816

Open
TobiasWrigstad opened this issue Jun 5, 2017 · 0 comments
Open

Deep error when mixing forward and return #816

TobiasWrigstad opened this issue Jun 5, 2017 · 0 comments
Assignees

Comments

@TobiasWrigstad
Copy link
Contributor

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 ***
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants