Skip to content
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

[Bug]: Compilation fails when do clause is present after an aggregation #41392

Closed
LakshanWeerasinghe opened this issue Sep 15, 2023 · 1 comment · Fixed by #41413
Closed

[Bug]: Compilation fails when do clause is present after an aggregation #41392

LakshanWeerasinghe opened this issue Sep 15, 2023 · 1 comment · Fixed by #41413
Assignees
Labels
Area/Parser Everything related to the ballerina lexer and the parser #Compiler Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug userCategory/Compilation

Comments

@LakshanWeerasinghe
Copy link
Contributor

LakshanWeerasinghe commented Sep 15, 2023

Description

Below ballerina code is a syntactically and semantically correct. But when we compile it gives compile-time errors.

function total(float[][] items) {
    from var i in items
    let float tot = from var j in i collect sum(j)
    do {
        
    };
}

Compile time errors are,

invalid expression statement
missing select clause
incompatible types: expected 'float', found '()'

Steps to Reproduce

No response

Affected Version(s)

2201.8.0-RC1

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@LakshanWeerasinghe LakshanWeerasinghe added Type/Bug Area/Parser Everything related to the ballerina lexer and the parser #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Sep 15, 2023
@ballerina-bot ballerina-bot added the needTriage The issue has to be inspected and labeled manually label Sep 15, 2023
@LakshanWeerasinghe LakshanWeerasinghe self-assigned this Sep 15, 2023
@LakshanWeerasinghe LakshanWeerasinghe removed the needTriage The issue has to be inspected and labeled manually label Sep 15, 2023
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@KavinduZoysa KavinduZoysa added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Parser Everything related to the ballerina lexer and the parser #Compiler Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug userCategory/Compilation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants