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 trust case class extractors with explicit type arguments #15669

Merged
merged 1 commit into from
Jul 14, 2022

Commits on Jul 13, 2022

  1. Don't trust case class extractors with explicit type arguments

    scala#6551 introduced an exception where type tests of parameterized case classes were not flagged
    as "type test cannot be checked at runtime". The idea was that the parameters would be inferred
    by GADT reasoning and would therefore be correct.
    
    But with scala#15356 we now also allow explicit type arguments in extractors. If these are given
    we cannot guarantee that a type test for a case class in an unapply will always succeed.
    So we need an unchecked warning.
    odersky committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    c4c4401 View commit details
    Browse the repository at this point in the history