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

Support match-stmt for const-pattern and var capture-binding-pattern #25082

Merged
merged 20 commits into from
Sep 15, 2020

Conversation

KavinduZoysa
Copy link
Contributor

@KavinduZoysa KavinduZoysa commented Aug 2, 2020

Purpose

$subject

Fixes #25040

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@KavinduZoysa KavinduZoysa added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Aug 2, 2020
@KavinduZoysa KavinduZoysa force-pushed the match-pattern branch 5 times, most recently from a2bd379 to 46be43c Compare August 6, 2020 11:38
@KavinduZoysa KavinduZoysa force-pushed the match-pattern branch 2 times, most recently from b0316b5 to af6731a Compare August 10, 2020 05:39
Copy link
Contributor

@KRVPerera KRVPerera left a 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);
}

@KavinduZoysa
Copy link
Contributor Author

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

@MaryamZi
Copy link
Member

@KavinduZoysa shall we resolve the conflicts and update the PR?

@KavinduZoysa KavinduZoysa force-pushed the match-pattern branch 3 times, most recently from ae04436 to 5b78a5a Compare September 2, 2020 13:09
Copy link
Member

@MaryamZi MaryamZi left a 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?

@KavinduZoysa KavinduZoysa force-pushed the match-pattern branch 2 times, most recently from fab78a5 to 4488f00 Compare September 10, 2020 14:27
hasithaa
hasithaa previously approved these changes Sep 14, 2020
hasithaa
hasithaa previously approved these changes Sep 15, 2020
@hasithaa hasithaa merged commit 3e4f465 into ballerina-platform:master Sep 15, 2020
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add const-pattern and var capture-binding-pattern for match-stmt
5 participants