Files
swift-mirror/test/decl/enum/objc_enum_Error.swift
Doug Gregor 823c24b355 [SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last
major piece to be implemented.
2016-07-12 10:53:52 -07:00

22 lines
407 B
Swift

// RUN: %target-parse-verify-swift
// REQUIRES: objc_interop
import Foundation
func acceptBridgeableNSError<E : _ObjectiveCBridgeableError>(_ e: E) { }
@objc enum E2 : Int, Error {
case A = 1
}
acceptBridgeableNSError(E2.A)
@objc enum E3 : Int {
case A = 1
}
acceptBridgeableNSError(E3.A)
// expected-error@-1{{argument type 'E3' does not conform to expected type '_ObjectiveCBridgeableError'}}