Sealed class members in Swift
Forums:
class Shape {
func getArуa() -> Int {
return 0
}
}
class Square: Shape {
var sideLength: Int = 0
final override func getArуa() -> Int {
return sideLength * sideLength
}
}
class RedSquare: Square {
override func getArуa() -> Int {//<- Error
}
}
- Log in to post comments