# Associated types can't be inferred from derived protocol

**URL:** <https://forums.swift.org/t/associated-types-cant-be-inferred-from-derived-protocol/27421>\
**Category:** Using Swift\
**Created:** [July 30, 2019, 7:34am UTC](https://forums.swift.org/t/associated-types-cant-be-inferred-from-derived-protocol/27421 "2019-07-30T07:34:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![xwu](https://avatars.discourse-cdn.com/v4/letter/x/b487fb/32.png) [@xwu](https://forums.swift.org/u/xwu)\
**Post date:** [July 30, 2019, 1:11pm UTC](https://forums.swift.org/t/associated-types-cant-be-inferred-from-derived-protocol/27421/6 "2019-07-30T13:11:16Z")

</div>

See this thread:

> [@Automatically inferring associatedtype when conforming to a refinement](https://forums.swift.org/t/automatically-inferring-associatedtype-when-conforming-to-a-refinement/23407):
>
> I'm seeing some weird associatedtype inference behavior when conforming to a refinement of a protocol that has an associatedtype: protocol P1 { associatedtype Input func req(\_ input: Input) } protocol P2: P1 { func req2(\_ input: Input) } extension P2 { func req(\_ input: Input) { req2(input) } } struct S: P2 { func req2(\_ input: String) { print(input) } } Gives error: badassoc2.swift:14:8: error: type 'S' does not conform to protocol 'P2' struct S: P2 { ^ badassoc2.swift:15…

---

_[View the full topic](https://forums.swift.org/t/associated-types-cant-be-inferred-from-derived-protocol/27421)._
