I have,
struct S {}
Along with,
func y (x: S) -> AnyObject {}
In Swift 2, is it possible to, within y(),
return x
My current code:
struct S {let value: Int = 0}
let x = S()
func y(x: S) -> AnyObject {return x}
Yields the following error:
return expression of type 'S' does not conform to type 'AnyObject'
Is there a way to mitigate this?