Files
swift-mirror/test/decl/enum/objc_enum_Error.swift
Pavel Yaskevich d90117bb8a [Diagnostics] Remove argument handling from conformance failures
Argument-to-Parameter mismatch handles conformance failures
related to arguments, so the logic in `MissingConformanceFailure`
which wasn't entirely correct is now completely obsolete.

Resolves: rdar://problem/56234611
2019-10-14 00:34:37 -07:00

22 lines
468 B
Swift

// RUN: %target-typecheck-verify-swift
// REQUIRES: objc_interop
import Foundation
func acceptBridgeableNSError<E : _ObjectiveCBridgeableError>(_ e: E) { } // expected-note {{where 'E' = 'E3'}}
@objc enum E2 : Int, Error {
case A = 1
}
acceptBridgeableNSError(E2.A)
@objc enum E3 : Int {
case A = 1
}
acceptBridgeableNSError(E3.A)
// expected-error@-1{{global function 'acceptBridgeableNSError' requires that 'E3' conform to '_ObjectiveCBridgeableError'}}