Skip to content

Instantly share code, notes, and snippets.

@b3ll
Created April 16, 2015 01:18
Show Gist options
  • Save b3ll/d36332d24bc8861aaa40 to your computer and use it in GitHub Desktop.
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 "
//
// 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