Skip to content

Commit bc29e53

Browse files
committed
Merge remote-tracking branch 'github/master' into HEAD
2 parents e50ad67 + 4b2fecf commit bc29e53

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/Sema/DerivedConformanceCodable.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,8 @@ static CodableConformanceType typeConformsToCodable(DeclContext *context,
8282
ProtocolDecl *proto) {
8383
target = context->mapTypeIntoContext(target);
8484

85-
if (isIUO) {
86-
return typeConformsToCodable(context,
87-
target->lookThroughSingleOptionalType(),
88-
false, proto);
89-
}
85+
if (isIUO)
86+
target = target->lookThroughSingleOptionalType();
9087

9188
auto conf = TypeChecker::conformsToProtocol(target, proto, context);
9289
return conf.isInvalid() ? DoesNotConform : Conforms;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// RUN: %target-typecheck-verify-swift %s
2+
3+
public struct S<T : Codable> : Codable {
4+
var s: [T]!
5+
}

0 commit comments

Comments
 (0)