Commits

Doug Gregor committed 0d37a6ee3dc
Let the type checker decide which protocol members are visible via conforming types. Deduced associated types are implemented by allowing name lookup into a type to find the requirements in the protocols to which that type conforms. If the protocol conformance produced the witness for the requirement via deduction (or, eventually, default definitions), we use the deduced witness; otherwise, the actual declaration within the type itself is used. Previously, the AST-level lookup was deciding whether to filter out protocol requirements based on the conformance information in the AST. However, this lead to ordering dependencies, because the type checker doesn't record the conformances in the AST until we've visited all of the conformances for a given declaration. This lead to an oddity where one could have one conformance depend on another's deduced associated type, but only if that conformance was on a later extension. Fixes <rdar://problem/14685674>. As part of this, teach the type checker to re-use normal conformances that get deserialized, rather than creating new ones. Otherwise, we'll end up with two different copies of the same conformance running around. Swift SVN r7075