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

Issues with flow control. #6

Open
back2dos opened this issue Jun 5, 2016 · 2 comments
Open

Issues with flow control. #6

back2dos opened this issue Jun 5, 2016 · 2 comments

Comments

@back2dos
Copy link
Member

back2dos commented Jun 5, 2016

Currently, there is nothing in place to ensure an async function ever completes. Simplest example:

@async function foo() {
}

This will generate something along the lines of:

function foo() return Future.async(function (__return) {})

There should be something to prevent that from happening.

@back2dos
Copy link
Member Author

back2dos commented Jun 5, 2016

Just to be clear: the above example is trivial of course. But in a complex method, if you forget to return in some branch, it goes unnoticed. That's the real problem.

@benmerckx
Copy link
Member

You're right. There's also other areas (where a value is expected) where we can't trust the compiler to throw an understandable warning after all is transformed. This will take some time, but isn't impossible I think.

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