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

added support for underscore pattern in match on tuples #4996

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

TomerStarkware
Copy link
Collaborator

@TomerStarkware TomerStarkware commented Feb 4, 2024

This change is Reviewable

@TomerStarkware TomerStarkware requested a review from orizi February 4, 2024 15:50
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @TomerStarkware)


crates/cairo-lang-lowering/src/lower/lower_match.rs line 105 at r1 (raw file):

                )));
            };
            //

I believe some push was missed.

Code quote:

            //

@TomerStarkware TomerStarkware force-pushed the tomer/match_on_tuples_underscore branch from a979a71 to b0e2fc9 Compare February 4, 2024 16:01
@TomerStarkware TomerStarkware force-pushed the tomer/match_on_tuples_underscore branch from b0e2fc9 to 1720363 Compare February 4, 2024 16:10
@TomerStarkware TomerStarkware force-pushed the tomer/match_on_tuples_underscore branch from 1720363 to e96ebf6 Compare February 4, 2024 16:13
Copy link
Collaborator Author

@TomerStarkware TomerStarkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @orizi)


crates/cairo-lang-lowering/src/lower/lower_match.rs line 105 at r1 (raw file):

Previously, orizi wrote…

I believe some push was missed.

Done

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r2, all commit messages.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @TomerStarkware)


crates/cairo-lang-lowering/src/test_data/match line 1510 at r2 (raw file):

        (true,true) => 1,
        _ => 2
    }

Suggestion:

fn foo() -> felt252 {
    match (true, false) {
        (true, true) => 1,
        _ => 2
    }

@TomerStarkware TomerStarkware force-pushed the tomer/refactor_match branch 5 times, most recently from 30ab4e5 to 52fe6b8 Compare February 4, 2024 16:46
@TomerStarkware TomerStarkware force-pushed the tomer/match_on_tuples_underscore branch from e96ebf6 to 1145d2b Compare February 4, 2024 16:57
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @TomerStarkware)

Base automatically changed from tomer/refactor_match to tomer/extract_lower_match February 5, 2024 08:28
@TomerStarkware TomerStarkware changed the base branch from tomer/extract_lower_match to tomer/refactor_match February 5, 2024 08:52
@TomerStarkware TomerStarkware force-pushed the tomer/match_on_tuples_underscore branch from 1145d2b to 5c3e72c Compare February 5, 2024 08:53
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@TomerStarkware TomerStarkware force-pushed the tomer/match_on_tuples_underscore branch from 5c3e72c to 2f62f97 Compare February 5, 2024 12:19
@TomerStarkware TomerStarkware changed the base branch from tomer/refactor_match to orizi/merge-main-into-sierra-minor-update February 5, 2024 12:19
@TomerStarkware TomerStarkware changed the base branch from orizi/merge-main-into-sierra-minor-update to main February 5, 2024 12:20
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@TomerStarkware TomerStarkware force-pushed the tomer/match_on_tuples_underscore branch from 2f62f97 to 356f7c4 Compare February 5, 2024 13:37
@TomerStarkware TomerStarkware added this pull request to the merge queue Feb 5, 2024
Merged via the queue into main with commit 6a2fe76 Feb 5, 2024
43 checks passed
@orizi orizi deleted the tomer/match_on_tuples_underscore branch February 14, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants