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]: Creation of nested character classes in regex patterns at runtime #40142

Closed
LakshanWeerasinghe opened this issue Apr 6, 2023 · 1 comment · Fixed by #40003
Closed
Assignees
Labels
Lang/Regexp Issues related to Ballerina regular expressions Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug userCategory/Compilation
Milestone

Comments

@LakshanWeerasinghe
Copy link
Contributor

Description

According to our spec nested character class defining should not be allowed. Following program execution should result in runtime error.

import ballerina/lang.regexp;

public function main() returns error? {
    string:RegExp pattern = check regexp:fromString("[a-z[a-z]]");
}

Steps to Reproduce

No response

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

@LakshanWeerasinghe LakshanWeerasinghe added Type/Bug Lang/Regexp Issues related to Ballerina regular expressions Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Apr 6, 2023
@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Apr 6, 2023
@LakshanWeerasinghe LakshanWeerasinghe removed the needTriage The issue has to be inspected and labeled manually label May 11, 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.

@LakshanWeerasinghe LakshanWeerasinghe added this to the 2201.6.0 milestone May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lang/Regexp Issues related to Ballerina regular expressions Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug userCategory/Compilation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants