Skip to content

Commit 61220a4

Browse files
authored
SE-0458: Add missing override keywords (#2663)
1 parent 488f5c7 commit 61220a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proposals/0458-strict-memory-safety.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class Super {
327327
}
328328

329329
class Sub: Super {
330-
@unsafe func f() { ... } // warning: override of safe instance method with unsafe instance method
330+
@unsafe override func f() { ... } // warning: override of safe instance method with unsafe instance method
331331
}
332332
```
333333

@@ -336,7 +336,7 @@ to suppress this warning, the `Sub` class itself can be marked as `@unsafe`, e.g
336336
```swift
337337
@unsafe
338338
class Sub: Super {
339-
func f() { ... } // no more warning
339+
override func f() { ... } // no more warning
340340
}
341341
```
342342

0 commit comments

Comments
 (0)