You need to import the Objective-C runtime, and then you can use class_getSuperclass() .
import ObjectiveC class A {} class B:A { func mySuper() -> AnyClass { return class_getSuperclass(self.dynamicType) } } B().mySuper()
It is very unlikely that this is a good idea for anything other than debugging and logging. Even then, it is very non-Swiftlike, and you must deeply rethink your problem before pursuing it. Even subclasses like this are pretty different from Swift. Protocols and extensions are almost always a better solution than inheriting pure Swift (and without inheritance there is no need to worry about superclasses).
source share