# "override" in protocols

**URL:** <https://forums.swift.org/t/override-in-protocols/20312>\
**Category:** Standard Library\
**Tags:** protocols\
**Created:** [February 9, 2019, 9:55pm UTC](https://forums.swift.org/t/override-in-protocols/20312 "2019-02-09T21:55:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTMacUser](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ctmacuser/32/1802_2.png) [@CTMacUser](https://forums.swift.org/u/CTMacUser)\
**Post date:** [February 9, 2019, 9:55pm UTC](https://forums.swift.org/t/override-in-protocols/20312/1 "2019-02-09T21:55:22Z")

</div>

[Maybe this should be in "Using Swift".]

I was reading the implementation of "RangeReplaceableCollection.swift" and noticed that there were three items from `Collection` repeated in the `RangeReplaceableCollection` primary definition. Those items had the "`override`" specifier added. Is that new for Swift 5? What does it mean?

Those three repeats (`SubSequence`, `subscript(bounds: Index)`, and `subscript(bounds: Range<Index>)`) had a "`FIXME: Associated type inference requires these.`" comment attached. Does that mean the `override` specifier for protocols will go away once the fix is in?

---

<div class="post-metadata">

**Author:** ![DevAndArtist](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/devandartist/32/287_2.png) [@DevAndArtist](https://forums.swift.org/u/DevAndArtist)\
**Post date:** [February 10, 2019, 6:25am UTC](https://forums.swift.org/t/override-in-protocols/20312/2 "2019-02-10T06:25:57Z")

</div>

Can you provide links to the lines in code please, I‘m curious what exactly you discovered?!

---

<div class="post-metadata">

**Author:** ![Dante-Broggi](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dante-broggi/32/7955_2.png) [@Dante-Broggi](https://forums.swift.org/u/Dante-Broggi)\
**Post date:** [February 10, 2019, 6:37am UTC](https://forums.swift.org/t/override-in-protocols/20312/3 "2019-02-10T06:37:26Z")

</div>

Having been lurking PRs when this was being implemented, I recall that protocol `override`s were added as a (stdlib private) feature to permit protocols to redeclare requirements, e.g. for associated type inference, while preventing the declaration from adding to the protocol's ABI.

---

<div class="post-metadata">

**Author:** ![suyashsrijan](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/suyashsrijan/32/5292_2.png) [@suyashsrijan](https://forums.swift.org/u/suyashsrijan)\
**Post date:** [February 10, 2019, 9:50pm UTC](https://forums.swift.org/t/override-in-protocols/20312/4 "2019-02-10T21:50:48Z")

</div>

Seems like it was added back in September in this PR: [Introduce overrides of protocol members and drop them from witness tables by DougGregor · Pull Request #19034 · apple/swift · GitHub](https://github.com/apple/swift/pull/19034)
