mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
22 lines
468 B
Swift
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'}}
|