Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Medium
-
Resolution: Done
-
Component/s: Compiler
-
Labels:
-
Radar URL:
Description
Consider following example:
class A { var a: Int { return 42 } func b() -> Int { return 42 } } class B: A { var a: Int { return 0 } func b() -> Int { return 0 } }
It produces following errors:
error: overriding declaration requires an 'override' keyword var a: Int { return 0 } ^ note: overridden declaration is here var a: Int { ^ error: overriding declaration requires an 'override' keyword func b() -> Int { ^ override note: overridden declaration is here func b() -> Int { return 42 } ^
But as you can see there is only one 'override' fix-it suggested - for `func b`.