tink_await
tink_await copied to clipboard
Issues with flow control.
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.
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.
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.