File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -531,6 +531,12 @@ bool ConcreteContraction::performConcreteContraction(
531531 // Phase 2: Replace each concretely-conforming generic parameter with its
532532 // concrete type.
533533 for (auto req : requirements) {
534+ if (Debug) {
535+ llvm::dbgs () << " @ Original requirement: " ;
536+ req.req .dump (llvm::dbgs ());
537+ llvm::dbgs () << " \n " ;
538+ }
539+
534540 // Substitute the requirement.
535541 Optional<Requirement> substReq = substRequirement (req.req );
536542
Original file line number Diff line number Diff line change @@ -200,7 +200,9 @@ void PropertyMap::concretizeTypeWitnessInConformance(
200200 AssociatedTypeDecl *assocType) const {
201201 auto concreteType = concreteConformanceSymbol.getConcreteType ();
202202 auto substitutions = concreteConformanceSymbol.getSubstitutions ();
203- auto *proto = concreteConformanceSymbol.getProtocol ();
203+
204+ auto *proto = assocType->getProtocol ();
205+ assert (proto == concreteConformanceSymbol.getProtocol ());
204206
205207 if (Debug.contains (DebugFlags::ConcretizeNestedTypes)) {
206208 llvm::dbgs () << " ^^ " << " Looking up type witness for "
Original file line number Diff line number Diff line change @@ -1416,7 +1416,7 @@ void RuleBuilder::collectRulesFromReferencedProtocols() {
14161416 // if neccessary, which will cause us to re-enter into a new RuleBuilder
14171417 // instace under RuleBuilder::initWithProtocolWrittenRequirements().
14181418 if (Dump) {
1419- llvm::dbgs () << " importing protocol " << proto->getName () << " { \n " ;
1419+ llvm::dbgs () << " importing protocol " << proto->getName () << " \n " ;
14201420 }
14211421
14221422 auto *machine = Context.getRequirementMachine (proto);
You can’t perform that action at this time.
0 commit comments