You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AST: Improve handling of missing @objc async protocol witnesses.
Serialization now enumerates the value witnesses of conformances with a
resolver in order to facilitate lazy type checking
(#68262). This change in behavior introduced
an assertion failure when compiling modules from swiftinterface when the
interface contains a conformance to an `@objc` protocol that has a requirement
that is imported with an `async` variant. The `forEachValueWitness()`
invocation during serialization was causing the missing witness for an objc
async protocol requirement to be resolved after conformance check was already
marked "complete". This witness had not been previously resolved because
`ConformanceChecker::resolveValueWitnesses()` had special logic to skip objc
protocol requirements with witnessed siblings, whereas `forEachValueWitness()`
did not.
There are multiple potential solutions to this problem, but the one that seemed
least disruptive to me was to stop skipping resolution of these sibling
witnesses during `ConformanceChecker::resolveValueWitnesses()`. When I looked
into why they were being skipped, I discovered that this seemed to be a
concession to bugs in the logic for pruning missing witnesses. When I adjusted
the pruning logic it no longer became necessary to skip witnesses in
`ConformanceChecker::resolveValueWitnesses()` in order to avoid incorrect
diagnostics.
Resolves rdar://119435253
0 commit comments