Skip to content

Instantly share code, notes, and snippets.

@nsillik
Created July 14, 2014 06:08
Show Gist options
  • Save nsillik/863464ea107e581cbade to your computer and use it in GitHub Desktop.
Save nsillik/863464ea107e581cbade to your computer and use it in GitHub Desktop.
Oh god, please don't.
import Foundation
import Cocoa
class Provider {
func giveMeOne<T: NSObject>() -> T {
return T()
}
}
let provider = Provider()
var aString : NSString = provider.giveMeOne()
var aView : NSView = provider.giveMeOne()
var anArray : NSArray = provider.giveMeOne()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment