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
Match values for >= etc #15199
Comments
@maheshika Can we move this issue https://github.com/ballerina-platform/ballerina-spec as this is a feature request to the language. |
Spec supports this. My Bad. The current compiler doesn't support this. Hence Issue is moved back to Ballerina-lang. According to the spec following should work. match x {
y if y is int && y > 5 => { }
} |
Current implementation do support this operation with just a tiny modification to @hasithaa s answer. match x {
var y if y is int && y > 5 => { }
} Not having the |
FIxed in sl-alpha. |
Currently Match only allows for exact matches like 3 or Gold.
Support for operators like >, <, >= etc would be great as well as the support for variables and formulas.
Added the request for this functionality following a slack mailthread.
The text was updated successfully, but these errors were encountered: