-
Notifications
You must be signed in to change notification settings - Fork 53
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
Clarify about future types used in wait expressions #1174
Comments
If you still wish to propose a change to the spec, please reopen. |
Yes. It is not equivalent. my mistake. But I think it is a subtype.
|
Can you please explain why the spec is in need of improvement here? |
if it is changed like that we can allow following code sample also.
According to the spec Currently it should be a compile time error because the type needs to be |
But why do you want to do that? It's not a useful example. Are there useful examples that cannot be handled with #1171? |
Useful examples can be handle. |
Description:
According to the current Ballerina specification under the
Wait action
topic,So according to that
future<T>
will use as static type ofwait-future-expr
.But in Ballerina
future<T> | future<U>
can be simplifies asfuture <T|U>
. So according to that we can usefuture<T> | future<U>
as the static type ofwait-future-expr
ryt?. So bothfuture<T>
and union offuture<T>
members can used as static type ofwait-future-expr
.So Isn't it better if we update the spec saying,
The text was updated successfully, but these errors were encountered: