Last active
February 19, 2019 18:52
-
-
Save keremvatandas/83192f90733c6de578d41ef0e6108b21 to your computer and use it in GitHub Desktop.
Revisions
-
keremvatandas revised this gist
Feb 19, 2019 . 1 changed file with 0 additions and 1 deletion.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 @@ -15,7 +15,6 @@ class User { } var anyType: Any anyType = User(name: "Kerem", age: 28, favProgLang: "Lisp") anyType.display() // Value of type 'Any' has no member 'display' -
keremvatandas created this gist
Feb 19, 2019 .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,27 @@ class User { var name: String var age: Int var favProgLang: String init(name: String, age: Int, favProgLang: String){ self.name = name self.age = age self.favProgLang = favProgLang } func display(){ print("Isim -> \(self.name)\nYas -> \(self.age)\nFavori Programlama Dili -> \(self.favProgLang)") } } var anyType: Any anyType = User(name: "Kerem", age: 28, favProgLang: "Lisp") anyType.display() // Value of type 'Any' has no member 'display' var anyType: Any anyType = User(name: "Kerem", age: 28, favProgLang: "Lisp") var res = anyType as! User res.display()