Created
April 16, 2015 01:18
-
-
Save b3ll/d36332d24bc8861aaa40 to your computer and use it in GitHub Desktop.
Apparently convenience initializers blow away inherited ones, even though they're named differently "
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// wat.swift | |
// Stratus | |
// | |
// Created by Adam Bell on 2015-04-15. | |
// Copyright (c) 2015 Adam Bell. All rights reserved. | |
// | |
import Foundation | |
class a : NSObject { | |
var i: Int | |
convenience init(stuff: Int) { | |
i = stuff | |
self.init() | |
} | |
} | |
class b : a { | |
var s: String | |
convenience init(otherStuff: String) { | |
s = otherStuff | |
self.init() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment