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

[SR-3278] default case diagnostics are misleading and non-resilient #45866

Open
CodaFi opened this issue Nov 26, 2016 · 0 comments
Open

[SR-3278] default case diagnostics are misleading and non-resilient #45866

CodaFi opened this issue Nov 26, 2016 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation

Comments

@CodaFi
Copy link
Member

CodaFi commented Nov 26, 2016

Previous ID SR-3278
Radar None
Original Reporter @CodaFi
Type Bug
Environment

OS X 10.12.1

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI
Assignee None
Priority Medium

md5: 552320e36ea71e1cac40b5821fde0305

Issue Description:

Currently, the compiler warns when this is the case, as in stdlib

extension ProcessTerminationStatus {
  var isSwiftTrap: Bool {
    switch self {
    case .exit(_):
      return false
    case .signal(let signal):
      return CInt(signal) == SIGILL || CInt(signal) == SIGTRAP
    default:
      // This default case is needed for standard library builds where
      // resilience is enabled
      return false
    }
  }
}

I think this warning doesn’t actually serve an intended purpose and I’d like to remove it, or at the very least curb it.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation
Projects
None yet
Development

No branches or pull requests

1 participant