You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it possible to do so that when @async is used with a function, its type is change, so if @await is not used when calling the function type checking would fail?
Example
@async function returnZero(): Int {
return 0;
}
var i: Int = @await returnZero(); // compilation succeeds
var p: Promise<Int> = returnZero(); // compilation succeeds
var i2: Int = returnZero(); // compilation fails
The text was updated successfully, but these errors were encountered:
Would it possible to do so that when
@async
is used with a function, its type is change, so if@await
is not used when calling the function type checking would fail?Example
The text was updated successfully, but these errors were encountered: