Skip to content

Commit 17798c7

Browse files
Merge pull request #82043 from nate-chandler/rdar152580661
[TypeLowering] Record pack used in aggregate signature.
2 parents 21fa0b4 + dfcb5ee commit 17798c7

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

lib/SIL/IR/TypeLowering.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2733,6 +2733,7 @@ namespace {
27332733
template <class LoadableLoweringClass>
27342734
TypeLowering *handleAggregateByProperties(CanType type,
27352735
RecursiveProperties props) {
2736+
props = mergeHasPack(HasPack_t(type->hasAnyPack()), props);
27362737
if (props.isAddressOnly()) {
27372738
return handleAddressOnly(type, props);
27382739
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %target-swift-frontend %s -target %target-swift-5.9-abi-triple -emit-ir
2+
3+
struct H<T> {
4+
var packs: [Pack<T>] {
5+
id(_packs)
6+
}
7+
let _packs: [Pack<T>]
8+
}
9+
10+
struct Pack<each T> {}
11+
12+
func id<T>(_ t: T) -> T {
13+
return t
14+
}

0 commit comments

Comments
 (0)