Files
swift-mirror/lib/Sema/CSSimplify.cpp
Doug Gregor 7b56977eff [Type checker] Consistently mark used protocol conformances as "used".
Keep track of the protocol conformances required to form a particular
solution. At the point where we apply a solution, mark each of those
conformances as "used" so we're sure they are complete for later
phases (SILGen, SIL optimizer, IRGen). This general mechanism makes
sure we don't miss any cases in CSApply, such as the multi-case
illustrated in the new test where CSApply doesn't form any AST notes
describing the type erasure in a function conversion, so it otherwise
wouldn't see the conformance to mark it "used".

Pavel went most of the way down this path to track conformances last
month for unrelated reasons (that didn't really pan out). Resurrect
his work to track conformances, but only use them to mark as "used".

Fixes rdar://problem/32111710.
2017-06-15 14:40:04 -07:00

186 KiB