class Base { class func getDefaultFooX() -> Int { return 12 } func foo(x: Int = getDefaultFooX()) {} } class Derived : Base { override class func getDefaultFooX() -> Int { return 42 } override func foo(x: Int = getDefaultFooX()) { print(x) } } func test1(obj: Base) { obj.foo() } func test2(obj: Derived) { obj.foo() } test1(obj: Derived()) test2(obj: Derived())