File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -871,8 +871,8 @@ ModuleFile::getConformanceChecked(ProtocolConformanceID conformanceID) {
871
871
872
872
case SerializedProtocolConformanceKind::Pack: {
873
873
auto conformanceIndex = (conformanceID >> SerializedProtocolConformanceKind::Shift) - 1 ;
874
- assert (conformanceIndex < Conformances .size () && " invalid pack conformance ID" );
875
- auto &conformanceOrOffset = Conformances [conformanceIndex];
874
+ assert (conformanceIndex < PackConformances .size () && " invalid pack conformance ID" );
875
+ auto &conformanceOrOffset = PackConformances [conformanceIndex];
876
876
if (!conformanceOrOffset.isComplete ()) {
877
877
BCOffsetRAII restoreOffset (DeclTypeCursor);
878
878
if (auto error = diagnoseFatalIfNotSuccess (
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ ModuleFile::ModuleFile(std::shared_ptr<const ModuleFileSharedCore> core)
110
110
allocateBuffer (Decls, core->Decls );
111
111
allocateBuffer (LocalDeclContexts, core->LocalDeclContexts );
112
112
allocateBuffer (Conformances, core->Conformances );
113
+ allocateBuffer (PackConformances, core->PackConformances );
113
114
allocateBuffer (SILLayouts, core->SILLayouts );
114
115
allocateBuffer (Types, core->Types );
115
116
allocateBuffer (ClangTypes, core->ClangTypes );
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
2
// RUN: %target-swift-frontend -emit-module %s -emit-module-path %t/pack_expansion_type.swiftmodule -DLIB -enable-experimental-feature VariadicGenerics
3
- // RUN: %target-swift-frontend -emit-sil %s -I %t -DAPP -module-name main -enable-experimental-feature VariadicGenerics
3
+ // RUN: %target-swift-frontend -emit-ir %s -I %t -DAPP -module-name main -enable-experimental-feature VariadicGenerics
4
4
5
5
// Because of -enable-experimental-feature VariadicGenerics
6
6
// REQUIRES: asserts
@@ -25,10 +25,9 @@ public func transparentCaller2() {
25
25
transparentCaller ( 1 , " hi " , false )
26
26
}
27
27
28
- public func calleeWithRequirement< each T : Equatable > ( _: repeat each T ) { }
29
-
30
- @_transparent public func callerWithRequirement( x: Int , y: String ) {
31
- calleeWithRequirement ( x, y)
28
+ @_alwaysEmitIntoClient
29
+ public func calleeWithRequirement< each T : Equatable > ( _ t: repeat each T ) {
30
+ repeat ( ( each t) == ( each t) )
32
31
}
33
32
34
33
#elseif APP
@@ -37,6 +36,6 @@ import pack_expansion_type
37
36
38
37
transparentCaller ( 1 , " hi " , false )
39
38
serializedCaller ( 1 , " hi " , false )
40
- callerWithRequirement ( x : 1 , y : " hi " )
39
+ calleeWithRequirement ( 1 , " hi " )
41
40
42
41
#endif
You can’t perform that action at this time.
0 commit comments