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]: Singleton types with parenthesis cannot be parsed in local variable declaration in some cases #41317

Open
lochana-chathura opened this issue Aug 29, 2023 · 0 comments
Labels
Area/Parser Everything related to the ballerina lexer and the parser #Compiler 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 Aug 29, 2023

Description

$subject.

Consider the below sample.

+2|-4|"s"|"a" a1 = 2; // ok

+2|-4|"s"|("a") a2 = 2; // ok

+2|(-4) a3 = 2; // ok

(+2)|(-4) a4 = 2; // ok

function foo() {
    +2|-4|"s"|"a" b1 = 2; // ok

    +2|-4|"s"|("a") b2 = 2; // cannot parse

    +2|(-4) b3 = 2; // cannot parse

    (+2)|(-4) b4 = 2; // ok
}

Affected Version(s)

SL 2201.7.1 at least

@lochana-chathura lochana-chathura added Type/Bug Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Area/Parser Everything related to the ballerina lexer and the parser #Compiler labels Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Parser Everything related to the ballerina lexer and the parser #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
None yet
Development

No branches or pull requests

1 participant