Last active
May 5, 2025 13:33
Revisions
-
Ben-G revised this gist
Jun 14, 2015 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ protocol Initializable { init() } class A : Initializable { var content:String -
Ben-G renamed this gist
May 30, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Ben-G created this gist
Feb 28, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ class A : Initializable { var content:String required init() { content = "TestContent" } } func createInstance<T where T:Initializable>(typeThing:T.Type) -> T { return typeThing() } let a = createInstance(A)