When using an @objc attribute to rename a method exposed to Obj-C, Swift doesn't handle method families properly.
For example, if I have a method
the generated Obj-C thunk will return a retained object, which is correct as this belongs to the new method family.
However, if I write the following
the generated Obj-C thunk will return an autoreleased object.
This could be fixed by adding the appropriate __attribute__((objc_method_family(none))) attribute to the method, but a far better fix would be to change the code that determines if it should be returning an owned or autoreleased object to consider the method family of the Obj-C selector rather than the Swift name of the method.