<div class="chatlog__message-group"> <div id="chatlog__message-container-527041520222601227" class="chatlog__message-container" data-message-id="527041520222601227"> <div class="chatlog__message"> <div class="chatlog__message-aside"><img class="chatlog__avatar" src="https://cdn.discordapp.com/avatars/293572563010060288/92f572b5e1ef6656a55498787c15a5ad.png?size=512" alt="Avatar" loading="lazy"></div> <div class="chatlog__message-primary"> <div class="chatlog__header"><span class="chatlog__author" style="color:rgb(231,76,60)" title="tarunon" data-user-id="293572563010060288">tarunon</span> <a href="/channels/430242233468452865?category=main&channel=swiftbot-sandbox&message_id=527041520222601227"><span class="chatlog__timestamp" title="Tuesday, December 25, 2018 8:34 AM"></span></a><a href="#chatlog__message-container-527041520222601227">12/25/2018 8:34 AM</a></div> <div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="swift42#0507">@swift-4.2.4</span> <code class="chatlog__markdown-pre chatlog__markdown-pre--multiline language-swift">class Base { class var defaultX: Int { return 12 } func foo(x: Int = defaultX) {} } class Derived : Base { override class var defaultX: Int { return 42 } override func foo(x: Int = defaultX) { print(x) } } func test1(obj: Base) { obj.foo() } func test2(obj: Derived) { obj.foo() } test1(obj: Derived()) test2(obj: Derived())</code></span></div> </div> </div> </div> </div>