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]: Add error:NoMessage only if it is there in the all the receive types in alternative-receive-action #41968

Closed
lochana-chathura opened this issue Jan 11, 2024 · 2 comments · Fixed by #42294
Assignees
Labels
Area/TypeChecker Type Checker related issues #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

Comments

@lochana-chathura
Copy link
Member

lochana-chathura commented Jan 11, 2024

Description

$subject.

Consider the below code,

function foobar() {
    boolean foo = true;

    worker w1 {
        if foo {
            10 -> w2;
        }
        20 -> w2;
    }

    worker w2 {
        int|error:NoMessage a = <- w1 | w1; // We should not enforce the `error:NoMessage` here.
    }

    _ = wait {a: w1, b: w2};
}
@lochana-chathura lochana-chathura added Type/Bug Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Area/TypeChecker Type Checker related issues #Compiler labels Jan 11, 2024
@lochana-chathura lochana-chathura self-assigned this Jan 11, 2024
@lochana-chathura lochana-chathura moved this to Planned for Sprint in Ballerina Team Main Board Jan 11, 2024
@lochana-chathura lochana-chathura changed the title [Bug]: Suppress the error:NoMessage when there is at least one receive type with no error:NoMessage in alternative-receive-action [Bug]: Add error:NoMessage only if it is there in the all the receive types in alternative-receive-action Jan 11, 2024
@lochana-chathura lochana-chathura moved this from Planned for Sprint to In Progress in Ballerina Team Main Board Jan 17, 2024
@lochana-chathura
Copy link
Member Author

lochana-chathura commented Jan 18, 2024

We also need to change the current name fromerror:NoMessageError to error:NoMessage as the error prefix implies the type is of an error.

@lochana-chathura
Copy link
Member Author

Fixed in #42050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/TypeChecker Type Checker related issues #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
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant