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]: Crash in lambda function inside do-clause #40216

Closed
KavinduZoysa opened this issue Apr 12, 2023 · 2 comments
Closed

[Bug]: Crash in lambda function inside do-clause #40216

KavinduZoysa opened this issue Apr 12, 2023 · 2 comments
Assignees
Labels
Crash All issues caused by NPE, CCE, etc Lang/Actions/Query Priority/High Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug

Comments

@KavinduZoysa
Copy link
Contributor

KavinduZoysa commented Apr 12, 2023

Description

When there is a lambda function that returns spread op ([...x]) inside do-clause, compiler crashes

Steps to Reproduce

import ballerina/io;

type Rec record {|
    string name;
    int[] price1;
|};

public function main() {
    Rec[] input = [{name: "Saman", price1: [11, 12]}, 
                    {name: "Saman", price1: [19, 20]}];
    _ = from var {name, price1} in input
                do {
                    function () returns [int...] func = function () returns [int...] => [...price1];
                };
}

Affected Version(s)

2201.4.1

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

@KavinduZoysa KavinduZoysa added Type/Bug Priority/High Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Crash All issues caused by NPE, CCE, etc Lang/Actions/Query labels Apr 12, 2023
@LakshanWeerasinghe
Copy link
Contributor

This issue is not reproducible from update 7 upwards. Hence closing.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash All issues caused by NPE, CCE, etc Lang/Actions/Query Priority/High Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
Archived in project
Development

No branches or pull requests

2 participants