blob: 02cc7308ca2978a074de7ae562b9cc05ef1e7d3d [file] [log] [blame] [edit]
// Test preamble text
import Foundation
@objc public class GlobalsWrapper: NSObject {
@objc static public func intFuncWrapper() throws -> MyClassWrapper {
let result = try intFunc()
return MyClassWrapper(result)
}
@objc static public func voidFuncWrapper(x: Int, y: Int) throws {
return try voidFunc(x: x, y: y)
}
}
@objc public class MyClassWrapper: NSObject {
var wrappedInstance: MyClass
init(_ wrappedInstance: MyClass) {
self.wrappedInstance = wrappedInstance
}
@objc public init(y: Int) throws {
wrappedInstance = try MyClass(y: y)
}
@objc public func voidMethod() throws {
return try wrappedInstance.voidMethod()
}
@objc public func intMethod(y: Int) throws -> MyClassWrapper {
let result = try wrappedInstance.intMethod(y: y)
return MyClassWrapper(result)
}
}