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

Fix tuple pattern matching issue where only some elements would violate caps. #2658

Merged
merged 1 commit into from
Apr 19, 2018

Commits on Apr 18, 2018

  1. Fix tuple pattern matching issue where some elements would violate caps.

    When pattern-matching tuples that have the same number of elements,
    ponyc was treating the entire match as violating capabilities when
    only one of the elements was violating. In truth we should be able
    to recognize that tuples are distinct from the other elements.
    
    This patch fixes `is_tuple_match_tuple` to return MATCHTYPE_REJECT
    as soon as any pairwise element comparison returns MATCHTYPE_REJECT.
    
    The fix was pinpointed by @Praetonus when I discussed this issue with
    him.
    jemc committed Apr 18, 2018
    Configuration menu
    Copy the full SHA
    4047144 View commit details
    Browse the repository at this point in the history