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

Unary expression can be a constant expression #30019

Closed
chiranSachintha opened this issue Apr 16, 2021 · 1 comment · Fixed by #30693
Closed

Unary expression can be a constant expression #30019

chiranSachintha opened this issue Apr 16, 2021 · 1 comment · Fixed by #30693
Assignees
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug

Comments

@chiranSachintha
Copy link
Member

Description:

following program should be valid

public const int MIN_VALUE = (-(10)); //currently gives error as `expression is not a constant expression`
public const int MAX_VALUE = -(10); //currently gives error as `expression is not a constant expression`
public function main() {
}
@chiranSachintha chiranSachintha added Type/Bug Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Apr 16, 2021
@rdhananjaya
Copy link
Member

Assigning to RandikaJ

@MaryamZi MaryamZi added this to the Ballerina Swan Lake - Beta2 milestone Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants