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

Don't follow BaseType of abstract binders in MT reduction #13780

Merged
merged 2 commits into from
Apr 4, 2022

Commits on Mar 30, 2022

  1. Don't follow BaseType of abstract binders in MT reduction

    Fix scala#11982 and the associated soundness problem. The issue with the
    behavior on master arises from the fact that type binder of match types
    might change as context gets more precise, which results in a single
    match type reducing in two different ways. This issue comes from the
    fact that subtyping looks into base types, and is thus able to match a
    type such as `T <: Tuple2[Int, Int]` against a pattern `case Tuple2[a,
    b]`, even if the best solutions for `a` and `b` in the current context
    are not guaranteed to be the best solution in more precise contexts
    (such as at call site in the added test case).
    OlivierBlanvillain committed Mar 30, 2022
    Configuration menu
    Copy the full SHA
    d1957e5 View commit details
    Browse the repository at this point in the history
  2. Address review

    OlivierBlanvillain committed Mar 30, 2022
    Configuration menu
    Copy the full SHA
    c0ca8e9 View commit details
    Browse the repository at this point in the history