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]: Not identifying unreachable code when there's a panic error after an infinite loop #42105

Closed
mindula opened this issue Feb 2, 2024 · 2 comments
Assignees
Labels
Area/Compiler Reason/Invalid Issue is invalid. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug

Comments

@mindula
Copy link
Contributor

mindula commented Feb 2, 2024

Description

Consider the following scenario where the unreachable code diagnostic should be displayed for panic error("").

Screenshot 2024-02-02 at 14 34 57

Steps to Reproduce

function foo(int a) returns int {
   int x = 1;
   while (true) {
      x+=1;
   }
   panic error("");
}

Affected Version(s)

No response

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

@mindula mindula added Type/Bug Area/Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Feb 2, 2024
@mindula mindula moved this to Planned for Sprint in Ballerina Team Main Board Feb 6, 2024
@mindula mindula moved this from Planned for Sprint to In Progress in Ballerina Team Main Board Feb 6, 2024
@mindula mindula self-assigned this Feb 6, 2024
@mindula
Copy link
Contributor Author

mindula commented Mar 8, 2024

Invalid because of ballerina-platform/ballerina-spec#1016

@mindula mindula closed this as completed Mar 8, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Ballerina Team Main Board Mar 8, 2024
@mindula mindula added the Reason/Invalid Issue is invalid. label Mar 8, 2024
Copy link

github-actions bot commented Mar 8, 2024

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
Area/Compiler Reason/Invalid Issue is invalid. 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

1 participant