mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
RequirementMachine: Pass SubstFlags::PreservePackExpansionLevel when re-sugaring requirements
This commit is contained in:
@@ -620,7 +620,8 @@ AbstractGenericSignatureRequest::evaluate(
|
|||||||
return Type(type);
|
return Type(type);
|
||||||
},
|
},
|
||||||
MakeAbstractConformanceForGenericType(),
|
MakeAbstractConformanceForGenericType(),
|
||||||
SubstFlags::AllowLoweredTypes);
|
SubstFlags::AllowLoweredTypes |
|
||||||
|
SubstFlags::PreservePackExpansionLevel);
|
||||||
resugaredRequirements.push_back(resugaredReq);
|
resugaredRequirements.push_back(resugaredReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
13
test/Generics/rdar115538386.swift
Normal file
13
test/Generics/rdar115538386.swift
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// RUN: %target-swift-frontend -typecheck %s -disable-availability-checking
|
||||||
|
|
||||||
|
protocol P<A> {
|
||||||
|
associatedtype A
|
||||||
|
}
|
||||||
|
|
||||||
|
struct S<each T>: P {
|
||||||
|
typealias A = (repeat each T)
|
||||||
|
}
|
||||||
|
|
||||||
|
func foo<each T>() -> some P<(repeat each T)> {
|
||||||
|
S<repeat each T>()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user