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

Better error messages when note using async features correctly (T7214) #4181

Closed
babel-bot opened this issue Mar 16, 2016 · 1 comment
Closed
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser

Comments

@babel-bot
Copy link
Collaborator

Issue originally made by @andresn

Options

Can we have something more user friendly other than syntax error, unexpected token under these kinds of scenarios:

function main() {
    var quote = await this.getQuote(); // only produces "Syntax error... unexpected token"
    console.log(quote);
}

/\

the correct way (if you didn't catch it):

async function main() {
     var quote = await this.getQuote(); // something like: "use of await method without parent method marked async"
    console.log(quote);
}

Description

@motiz88
Copy link
Contributor

motiz88 commented Oct 4, 2016

Closing in favor of babel/babylon#113.

@motiz88 motiz88 closed this as completed Oct 4, 2016
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 6, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser
Projects
None yet
Development

No branches or pull requests

3 participants