Commits

Arnold Schwaighofer committed a9cbacd456b
[SILCombine] Use the opened archetype instead of reading the type from self The opened archetype already has metatypes stripped off. The problem was in code that tried to propagate the type from open_existentials in static existential calls. %0 = metatype thick ClientSocket.Type %1 = init_existential_metatype %0 : thick ClientSocket.Type, thick Socket.Type %2 = open_existential_metatype %1 : thick Socket.Type to thick (@opened(...) Socket).Type %3 = witness_method opened(...) Socket, #Socket.newWithConfig!1, %2 try_apply %3<@opened(...) Socket>(%2) We would read the type of '%2' which is a metatype of '@open(...)' in the substitution replacement code comparing it to the subsitution which is just '@open(...)'. We already computed the archetype earlier so just use that instead. SR-811 rdar://24825970