Skip to content

Instantly share code, notes, and snippets.

@jamesrochabrun
Created January 20, 2017 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesrochabrun/6048cbb47ed68856f241764bec2387e3 to your computer and use it in GitHub Desktop.
Save jamesrochabrun/6048cbb47ed68856f241764bec2387e3 to your computer and use it in GitHub Desktop.
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