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

Ponyc assertion on funky lambda capabilities #1928

Closed
cquinn opened this issue May 24, 2017 · 3 comments
Closed

Ponyc assertion on funky lambda capabilities #1928

cquinn opened this issue May 24, 2017 · 3 comments

Comments

@cquinn
Copy link
Contributor

cquinn commented May 24, 2017

Whilst randomly trying to fix capability errors in my code, I ended up with a combination that causes ponyc to assert. This is the latest master ponyc built and run on MacOS.

I've narrowed the case down to the following snippet (which most likely has errors, but shouldn't break the compiler):

class val Thing
  let result: {(Bool val)}

  new val bool(result': {(Bool)} val = {(Bool)=>None}) ? =>
    result = result'
@SeanTAllen
Copy link
Member

Error is:

src/libponyc/pass/scope.c:19: set_scope: Assertion `ast_id(name) == TK_ID` failed.

@cquinn
Copy link
Contributor Author

cquinn commented May 24, 2017

Oops, I forgot to include the error. That's what I see too.

@SeanTAllen
Copy link
Member

This is fixed and now gives a proper error.

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

3 participants