Is there an equivalent to NS_REQUIRES_SUPER in Swift?

Viewed 89

I'd like to write a class function that requires that subclasses call the "super" version of the function. In Objective-C, the NS_REQUIRES_SUPER compiler directive emits an error/warning for this case. Is there an equivalent in Swift?

(The use case is a series of XCTestCase subclasses that perform different setups as they go down the class hierarchy, e.g. creating a test directory, creating CoreData stores, etc.)

0 Answers
Related