mirror of
https://github.com/apple/swift.git
synced 2026-10-10 13:50:43 +02:00
When a class conforms to a protocol, the witness thunk might have a covariant Self generic parameter. The presence of this generic parameter causes problems when the witness thunk calls a default implementation, because that default implementation is generic. To avoid this problem, inline the callee into the witness thunk so it becomes non-generic while retaining dynamic dispatch on the actual Self type. This is a longstanding issue with Embedded Swift and classes that conform to protocols. Fixes rdar://177527091.