Skip to content

Instantly share code, notes, and snippets.

@marciok
Last active February 1, 2016 21:14
Show Gist options
  • Select an option

  • Save marciok/0588fb135b948d169fa1 to your computer and use it in GitHub Desktop.

Select an option

Save marciok/0588fb135b948d169fa1 to your computer and use it in GitHub Desktop.
class Unicorn {
final func numbersOfHorns() -> Int {
return 1
}
}
// If we try to override the method.
class Horse: Unicorn {
override func numbersOfHorns() -> Int { // ERROR: Instance method overrides a 'final' instance method
return 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment