@@ -356,11 +356,11 @@ * @brief Increases the retain count. * * Each time an object is released, the retain count gets decreased and the * object deallocated if it reaches 0. */ -- retain; +- (instancetype)retain; /*! * @brief Returns the retain count. * * @return The retain count @@ -379,18 +379,18 @@ * @brief Adds the object to the topmost OFAutoreleasePool of the thread's * autorelease pool stack. * * @return The object */ -- autorelease; +- (instancetype)autorelease; /*! * @brief Returns the receiver. * * @return The receiver */ -- self; +- (instancetype)self; /*! * @brief Returns whether the object is a proxy object. * * @return A boolean whether the object is a proxy object @@ -469,17 +469,17 @@ * This method will never return `nil`, instead, it will throw an * @ref OFAllocFailedException. * * @return The allocated object */ -+ alloc; ++ (instancetype)alloc; /*! * @brief Allocates memory for a new instance and calls @ref init on it. * @return An allocated and initialized object */ -+ new; ++ (instancetype)new; /*! * @brief Returns the class. * * @return The class @@ -624,11 +624,11 @@ * This method exists so that classes can be used in collections requiring * conformance to the OFCopying protocol. * * @return The class of the object */ -+ copy; ++ (id)copy; /*! * @brief Initializes an already allocated object. * * Derived classes may override this, but need to do @@ -639,11 +639,11 @@ * `nil`, instead an exception (for example @ref * OFInitializationFailedException) should be thrown. * * @return An initialized object */ -- init; +- (instancetype)init; /*! * @brief Returns the method signature for the specified selector. * * @param selector The selector for which the method signature should be @@ -1116,11 +1116,11 @@ * copy. If only a mutable version of the class exists, it creates a mutable * copy. * * @return A copy of the object */ -- copy; +- (id)copy; @end /*! * @protocol OFMutableCopying OFObject.h ObjFW/OFObject.h * @@ -1133,11 +1133,11 @@ /*! * @brief Creates a mutable copy of the object. * * @return A mutable copy of the object */ -- mutableCopy; +- (id)mutableCopy; @end /*! * @protocol OFComparing OFObject.h ObjFW/OFObject.h *