Files
swift-mirror/test/SILGen/Inputs/ObjectiveC.swift
Slava Pestov 96db387ad3 Fix symbol visibility in fake overlays
Stronger assertions are coming which will trigger if these
are defined as internal.
2017-03-29 00:46:28 -07:00

36 lines
797 B
Swift

// Fake ObjectiveC module for testing String/NSString bridging.
@_exported import ObjectiveC
public struct ObjCBool {
var value : UInt8
public var boolValue: Bool {
if value == 0 { return false }
return true
}
}
@_silgen_name("swift_BoolToObjCBool")
public func _convertBoolToObjCBool(_ x: Bool) -> ObjCBool
@_silgen_name("swift_ObjCBoolToBool")
public func _convertObjCBoolToBool(_ x: ObjCBool) -> Bool
public struct Selector : ExpressibleByStringLiteral {
private var ptr : OpaquePointer
public init(unicodeScalarLiteral value: String) {
self.init(stringLiteral: value)
}
public init(extendedGraphemeClusterLiteral value: String) {
self.init(stringLiteral: value)
}
public init (stringLiteral value: String) {
self = sel_registerName(value)
}
}