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

Embedded shorthand pattern match doesn't work in async functions #28

Open
davej opened this issue Aug 6, 2015 · 0 comments
Open

Embedded shorthand pattern match doesn't work in async functions #28

davej opened this issue Aug 6, 2015 · 0 comments

Comments

@davej
Copy link

davej commented Aug 6, 2015

For example, this fails with Illegal clause error:

async manual-install = (match) ->
    "Nginx" -> await nginx-setup.manual-details()
    "Apache" -> await apache-setup.manual-details()

But the longhand works fine:

async manual-install = (type) ->
   match type:
      "Nginx" -> await nginx-setup.manual-details()
      "Apache" -> await apache-setup.manual-details()
@davej davej changed the title Embedded shorthand match doesn't work in async functions Embedded shorthand pattern match doesn't work in async functions Aug 6, 2015
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

1 participant