Files
swift-mirror/test/AssociatedTypeInference
Slava Pestov 69ebffbace Sema: Fix regression with 'Failure' type witness inference hack
We have a special hack to infer the 'Failure' type witness in
'AsyncIteratorProtocol' by considering the type of 'next()'
witness.

In eaf06eae0e I added a check to
fix some assertions that could happen if 'next()' was witnessed
by a declaration in a protocol extension or superclass, which
has a different generic signature.

However my check was too narrow, because it also prohibited
this form of inference when 'next()' was in a different
extension of the same nominal type.

Allow this again.

Fixes https://github.com/swiftlang/swift/issues/79367.
Fixes rdar://problem/145341658.
2025-04-04 10:28:17 -04:00
..
2024-08-29 16:18:14 -04:00