-
Notifications
You must be signed in to change notification settings - Fork 755
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
[Spec Deviation] Actions nested inside other actions #17993
Comments
Just realized, the above scenario cannot be allowed according to the spec right? The remote method call is defined as follows:
And the arg-list is defined as follows:
An action invocation cannot be an argument according to the above right? |
Yeah, according to the current spec grammar this doesn't seem valid. But should we check on the possibility of allowing this, as discussed offline? |
Yeah, +1. IIRC, this issue was created because someone asked about nesting and chaining. |
Since the specific scenario is not allowed as per the spec, left it out. A limited number of of actions that can be nested, was left allowed. |
Description:
The 2019r3 spec says
"Actions are an intermediate syntactic category between expressions and statements. Actions are similar to expressions, in that they yield a value. However, an action cannot be nested inside an expression; it can only occur as part of a statement or nested inside other actions. This is because actions are shown in the sequence diagram in the graphical syntax."
Steps to reproduce:
The following is not allowed though.
$ ballerina run test.bal error: .::test.bal:14:23: action invocation as an expression not allowed here
Affected Versions:
1.0.0-beta-SNAPSHOT - 15th August build
The text was updated successfully, but these errors were encountered: