File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 12
12
13
13
#include " SILGen.h"
14
14
#include " swift/AST/Decl.h"
15
+ #include " swift/AST/PackConformance.h"
15
16
#include " swift/AST/ProtocolConformance.h"
17
+ #include " swift/AST/ProtocolConformanceRef.h"
16
18
#include " swift/ClangImporter/ClangModule.h"
17
19
#include " swift/SIL/SILInstruction.h"
18
20
#include " swift/SIL/SILVisitor.h"
@@ -31,6 +33,16 @@ void SILGenModule::useConformance(ProtocolConformanceRef conformanceRef) {
31
33
if (conformanceRef.isAbstract ())
32
34
return ;
33
35
36
+ // Recursively visit pack conformances.
37
+ if (conformanceRef.isPack ()) {
38
+ auto *packConformance = conformanceRef.getPack ();
39
+
40
+ for (auto patternConformanceRef : packConformance->getPatternConformances ())
41
+ useConformance (patternConformanceRef);
42
+
43
+ return ;
44
+ }
45
+
34
46
auto conformance = conformanceRef.getConcrete ();
35
47
36
48
// Always look through inherited conformances.
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-emit-silgen %s -enable-experimental-feature VariadicGenerics
2
+
3
+ // Because of -enable-experimental-feature VariadicGenerics
4
+ // REQUIRES: asserts
5
+
6
+ struct Variadic < T... > where each T : Equatable { }
7
+
8
+ _ = Variadic < Int , String > ( )
You can’t perform that action at this time.
0 commit comments