Created
January 20, 2017 20:36
-
-
Save jamesrochabrun/6048cbb47ed68856f241764bec2387e3 to your computer and use it in GitHub Desktop.
This file contains 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 characters
class Dog { | |
var name: String | |
init(name: String) { | |
self.name = name | |
} | |
} | |
class Chihuahua: Dog { | |
override init(name: String) { | |
super.init(name: name) | |
} | |
} | |
let dog = Dog(name: "max") | |
let chihuahua = Chihuahua(name: "sam") | |
let array = [dog, chihuahua] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment