tink_await icon indicating copy to clipboard operation
tink_await copied to clipboard

Issues with flow control.

Open back2dos opened this issue 9 years ago • 2 comments

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 avatar Jun 05 '16 15:06 back2dos

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.

back2dos avatar Jun 05 '16 15:06 back2dos

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.

benmerckx avatar Jun 06 '16 08:06 benmerckx