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(
531
531
// Phase 2: Replace each concretely-conforming generic parameter with its
532
532
// concrete type.
533
533
for (auto req : requirements) {
534
+ if (Debug) {
535
+ llvm::dbgs () << " @ Original requirement: " ;
536
+ req.req .dump (llvm::dbgs ());
537
+ llvm::dbgs () << " \n " ;
538
+ }
539
+
534
540
// Substitute the requirement.
535
541
Optional<Requirement> substReq = substRequirement (req.req );
536
542
Original file line number Diff line number Diff line change @@ -200,7 +200,9 @@ void PropertyMap::concretizeTypeWitnessInConformance(
200
200
AssociatedTypeDecl *assocType) const {
201
201
auto concreteType = concreteConformanceSymbol.getConcreteType ();
202
202
auto substitutions = concreteConformanceSymbol.getSubstitutions ();
203
- auto *proto = concreteConformanceSymbol.getProtocol ();
203
+
204
+ auto *proto = assocType->getProtocol ();
205
+ assert (proto == concreteConformanceSymbol.getProtocol ());
204
206
205
207
if (Debug.contains (DebugFlags::ConcretizeNestedTypes)) {
206
208
llvm::dbgs () << " ^^ " << " Looking up type witness for "
Original file line number Diff line number Diff line change @@ -1416,7 +1416,7 @@ void RuleBuilder::collectRulesFromReferencedProtocols() {
1416
1416
// if neccessary, which will cause us to re-enter into a new RuleBuilder
1417
1417
// instace under RuleBuilder::initWithProtocolWrittenRequirements().
1418
1418
if (Dump) {
1419
- llvm::dbgs () << " importing protocol " << proto->getName () << " { \n " ;
1419
+ llvm::dbgs () << " importing protocol " << proto->getName () << " \n " ;
1420
1420
}
1421
1421
1422
1422
auto *machine = Context.getRequirementMachine (proto);
You can’t perform that action at this time.
0 commit comments