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]:CCE when sync-send-action used with check expression #40759

Closed
prakanth97 opened this issue Jun 19, 2023 · 3 comments · Fixed by #38245
Closed

[Bug]:CCE when sync-send-action used with check expression #40759

prakanth97 opened this issue Jun 19, 2023 · 3 comments · Fixed by #38245

Comments

@prakanth97
Copy link
Contributor

Description

function testAsyncSendAsExpressionWithCheckExpr() {
    worker w1 {
        () a = check (5 ->> w2);
    }

    worker w2 returns error? {
        int x = <- w1;
    }

    map<error?> mapResult = wait {w1, w2};
}

Got error: error while generating method '$lambda$_0' in class 'prakanth/test/0/main' for above example.

Steps to Reproduce

No response

Affected Version(s)

2201.6.0 and master

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

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Jun 19, 2023
@prakanth97
Copy link
Contributor Author

#38245 In this fix we are making async-send an action node. With that fix below code is valid. For that also we are getting the same error as above.

function testAsyncSendAsExpressionWithCheckExpr() {
    worker w1 {
        () a = check 5 -> w2;
    }

    worker w2 returns error? {
        int x = <- w1;
    }

    map<error?> mapResult = wait {w1, w2};
}

@prakanth97 prakanth97 removed the needTriage The issue has to be inspected and labeled manually label Jun 19, 2023
@prakanth97 prakanth97 self-assigned this Jun 19, 2023
@prakanth97 prakanth97 moved this to In Progress in Ballerina Team Main Board Jun 19, 2023
@prakanth97
Copy link
Contributor Author

prakanth97 commented Jun 20, 2023

function testAsyncSendAsExpressionWithMatchStmt() {
    worker w1 {
        match (5 ->> w2) {
            () => {
                return;
            }

            _ => {
                panic error("This is an error");
            }
        }
    }

    worker w2 {
        int x = <- w1;
    }

    _ = wait {w1, w2};
}

sync-send-action or async-send-action with match statement results in exception from code-gen error while generating method '$lambda$_2' in class 'prakanth/test/0/main'

@prakanth97 prakanth97 moved this from In Progress to PR Sent in Ballerina Team Main Board Jun 26, 2023
@github-project-automation github-project-automation bot moved this from PR Sent to Done in Ballerina Team Main Board Aug 15, 2023
@github-actions
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
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants