Skip to content

Commit 26d0973

Browse files
authored
Merge pull request #66597 from hborla/5.9-generic-env-context-substitutions
[5.9][GenericEnvironment] Don't apply outer context substitutions before `type.subst` in `mapTypeIntoContext`.
2 parents 343caf2 + e9a3218 commit 26d0973

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/AST/GenericEnvironment.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,6 @@ Type GenericEnvironment::mapTypeIntoContext(
635635
assert((!type->hasArchetype() || type->hasLocalArchetype()) &&
636636
"already have a contextual type");
637637

638-
type = maybeApplyOuterContextSubstitutions(type);
639638
Type result = type.subst(QueryInterfaceTypeSubstitutions(this),
640639
lookupConformance,
641640
SubstFlags::AllowLoweredTypes |

test/Constraints/pack-expansion-expressions.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,3 +552,11 @@ do {
552552
_ = (repeat overloaded(1, each a))
553553
}
554554
}
555+
556+
func configure<T, each Element>(
557+
_ item: T,
558+
with configuration: repeat (ReferenceWritableKeyPath<T, each Element>, each Element)
559+
) -> T {
560+
repeat item[keyPath: (each configuration).0] = (each configuration).1
561+
return item
562+
}

0 commit comments

Comments
 (0)