Swift Tutorial - Tutorialspoint

(backadmin) #1

^


<stdin>:25:14: error: var overrides a 'final' var
override var radius: Double {

^

<stdin>:6:14: note: overridden declaration is here
final var radius = 12.5

Since the super class is declared as 'final' and its data types are also declared as 'final' the
program won't allow to create subclasses further and it will throw errors.

Free download pdf