Commits

Doug Gregor committed 880ad409dbe
Pick the potential archetype we use for the actual archetype more intelligently. Archetypes either need to be a root, which corresponds to a type parameter, or need to be parented by another archetype. When the representative of an equivalence class of potential archetypes has a parent, but that parent has been made equivalent to some concrete type via a same-type constraint, choose a different potential archetype as the "anchor", i.e., one that has no concrete types in its parent chain. Fixes rdar://problem/21625478 and the canonical example in rdar://problem/17619740. Swift SVN r29898