Skip to content

Commit 281ce3d

Browse files
authored
Merge pull request #36442 from DougGregor/error-codingkey-backward-interface
2 parents 179a707 + 2b72725 commit 281ce3d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,6 +2479,12 @@ static bool usesFeatureMarkerProtocol(Decl *decl) {
24792479
if (proto->isMarkerProtocol())
24802480
return true;
24812481

2482+
// Swift.Error and Swift.CodingKey "don't" use the marker protocol.
2483+
if (proto->isSpecificProtocol(KnownProtocolKind::Error) ||
2484+
proto->isSpecificProtocol(KnownProtocolKind::CodingKey)) {
2485+
return false;
2486+
}
2487+
24822488
if (checkInherited(proto->getInherited()))
24832489
return true;
24842490

0 commit comments

Comments
 (0)