-
Notifications
You must be signed in to change notification settings - Fork 753
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
Support match-stmt for const-pattern and var capture-binding-pattern #25082
Support match-stmt for const-pattern and var capture-binding-pattern #25082
Conversation
a2bd379
to
46be43c
Compare
compiler/ballerina-lang/src/main/java/org/ballerinalang/util/diagnostic/DiagnosticCode.java
Outdated
Show resolved
Hide resolved
...allerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/ConstantPropagation.java
Outdated
Show resolved
Hide resolved
b0316b5
to
af6731a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 This negative example crashes now.
function captureBindingPattern1(any v) returns string {
match v {
}
}
public function main() {
var x = captureBindingPattern1(2);
}
This should be handled in the parser, created an issue #25296 |
0d83885
to
15f540a
Compare
compiler/ballerina-lang/src/main/java/org/ballerinalang/model/clauses/MatchClauseNode.java
Outdated
Show resolved
Hide resolved
...lerina-lang/src/main/java/org/wso2/ballerinalang/compiler/tree/clauses/BLangMatchClause.java
Outdated
Show resolved
Hide resolved
...lerina-lang/src/main/java/org/wso2/ballerinalang/compiler/tree/clauses/BLangMatchClause.java
Outdated
Show resolved
Hide resolved
...rina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/CodeAnalyzer.java
Outdated
Show resolved
Hide resolved
...-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/SemanticAnalyzer.java
Outdated
Show resolved
Hide resolved
...-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java
Outdated
Show resolved
Hide resolved
@KavinduZoysa shall we resolve the conflicts and update the PR? |
ae04436
to
5b78a5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KavinduZoysa shall we sync the PR with master since we haven't done so in a few days?
tests/jballerina-unit-test/src/test/resources/test-src/statements/matchstmt/const-pattern.bal
Outdated
Show resolved
Hide resolved
tests/jballerina-unit-test/src/test/resources/test-src/statements/matchstmt/const-pattern.bal
Outdated
Show resolved
Hide resolved
...-lang/src/main/java/org/wso2/ballerinalang/compiler/tree/statements/BLangMatchStatement.java
Show resolved
Hide resolved
fab78a5
to
4488f00
Compare
ff0f894
to
f28f031
Compare
f28f031
to
670af99
Compare
670af99
to
d58689d
Compare
Purpose
$subject
Fixes #25040
Check List