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

Restore unreachable warnings by converting literals #13290

Merged
merged 7 commits into from
Aug 30, 2021

Commits on Aug 26, 2021

  1. Restore unreachable warnings by converting literals

    The fix implemented to deal with primitive types auto-converting was
    suppressing a series of legitimate unreachable warnings.  So we removed
    that fix and tried to mirror the auto-conversion of the type, such that
    the space intersection calculation ends up with the correct results.
    
    In doing so we triggered reachability warnings being emitted by
    sealed trait companion object (or enum) `ordinal` synthetic methods, in
    some weird test cases.  So we added an `@unchecked` annotation to
    suppress those.
    
    Co-authored-by: Seth Tisue <seth@tisue.net>
    dwijnand and SethTisue committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    d17d0dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5fb2ac0 View commit details
    Browse the repository at this point in the history
  3. Tweak reachability to only warn after the first reachable case

    In the event that the first case is unreachable, the logic descended to
    `isSubspace(covered, prevs)` where both are the Empty Space, emitting
    warnings.  Instead we implement reachability like the Scala 2 compiler
    defines it:
    
        // a case is unreachable if it implies its preceding cases
    dwijnand committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    a945326 View commit details
    Browse the repository at this point in the history
  4. Change Space intersect so that the fallback for extractors matches th…

    …e fallback for type spaces
    dwijnand committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    202b63e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4b0f32f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    be658f6 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2021

  1. Configuration menu
    Copy the full SHA
    8776906 View commit details
    Browse the repository at this point in the history