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

incorrect return type of async function ruined tsc 1.6.2 #5115

Closed
cevek opened this issue Oct 5, 2015 · 2 comments
Closed

incorrect return type of async function ruined tsc 1.6.2 #5115

cevek opened this issue Oct 5, 2015 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority

Comments

@cevek
Copy link

cevek commented Oct 5, 2015

/usr/local/lib/node_modules/typescript/lib/tsc.js:29825

async function abc():number{
    return 123;
}
/usr/local/lib/node_modules/typescript/lib/tsc.js:29825
                throw e;
                      ^
TypeError: Cannot read property 'flags' of undefined
    at isRelatedTo (/usr/local/lib/node_modules/typescript/lib/tsc.js:13951:56)
@mhegazy mhegazy added Bug A bug in TypeScript Help Wanted You can do this and removed Help Wanted You can do this labels Oct 5, 2015
@mhegazy mhegazy added this to the TypeScript 1.7 milestone Oct 5, 2015
@danquirk
Copy link
Member

danquirk commented Oct 5, 2015

At a glance, every single test we have using async returns Promise<void>. Really need to beef that up for non-void Promises as well as other cases like this one.

@mhegazy
Copy link
Contributor

mhegazy commented Oct 5, 2015

+1 for more tests

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority
Projects
None yet
Development

No branches or pull requests

4 participants