Skip to content

Instantly share code, notes, and snippets.

View helje5's full-sized avatar

Helge Heß helje5

View GitHub Profile
@helje5
helje5 / GenericDowncast.swift
Last active February 11, 2018 10:20
Swift Generic Downcast Question
protocol BaseProtocol {
func doIt()
}
protocol DerivedProtocol : BaseProtocol {
func hello()
}
class MyObject: DerivedProtocol {
func doIt() { print("doIt") }
func hello() { print("hello") }
//
// main.swift
// TestRecursiveNSArchive
//
// Created by Helge Hess on 09.12.17.
// Copyright © 2017 ZeeZide GmbH. All rights reserved.
//
import Foundation
### Keybase proof
I hereby claim:
* I am helje5 on github.
* I am helge (https://keybase.io/helge) on keybase.
* I have a public key whose fingerprint is F122 BE44 B11D 97AC B1A2 3231 1809 11CB 8B32 F5FA
To claim this, I am signing this object: