Last active
February 1, 2016 21:14
-
-
Save marciok/0588fb135b948d169fa1 to your computer and use it in GitHub Desktop.
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 characters
| 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