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

Regression: Fix match type extraction of a MatchAlias #20111

Merged
merged 1 commit into from
Apr 5, 2024

Commits on Apr 5, 2024

  1. Fix match type extraction of a MatchAlias

    Previously this failed with:
    
    ```
    14 |    val x: Base.ExtractValue[Sub[Int *: EmptyTuple]] = 1
       |                                                       ^
       |           Found:    (1 : Int)
       |           Required: Base.ExtractValue[Sub[Int *: EmptyTuple]]
       |
       |           Note: a match type could not be fully reduced:
       |
       |             trying to reduce  Base.ExtractValue[Sub[Int *: EmptyTuple]]
       |             failed since selector Sub[Int *: EmptyTuple]
       |             does not uniquely determine parameter v in
       |               case Base.BaseOf[v] => v
       |             The computed bounds for the parameter are:
       |               v = Tuple.Head[Int *: EmptyTuple]
    ```
    
    Because the match type logic incorrectly believed that `v` was a non-alias
    TypeBounds.
    smarter committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    0ddba5d View commit details
    Browse the repository at this point in the history