File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
test/decl/protocol/special/coding Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -3226,11 +3226,13 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
3226
3226
3227
3227
// Temporary restriction until we figure out pattern matching and
3228
3228
// enum case construction with packs.
3229
- if (auto genericSig = ED->getGenericSignature ()) {
3230
- for (auto paramTy : genericSig.getGenericParams ()) {
3231
- if (paramTy->isParameterPack ()) {
3232
- ED->diagnose (diag::enum_with_pack);
3233
- break ;
3229
+ if (!ED->isSynthesized ()) {
3230
+ if (auto genericSig = ED->getGenericSignature ()) {
3231
+ for (auto paramTy : genericSig.getGenericParams ()) {
3232
+ if (paramTy->isParameterPack ()) {
3233
+ ED->diagnose (diag::enum_with_pack);
3234
+ break ;
3235
+ }
3234
3236
}
3235
3237
}
3236
3238
}
Original file line number Diff line number Diff line change
1
+ // RUN: %target-typecheck-verify-swift -target %target-swift-5.9-abi-triple
2
+
3
+ // We should accept this:
4
+
5
+ public struct HasPack < each T > : Codable {
6
+ var x : String ?
7
+ }
You can’t perform that action at this time.
0 commit comments