@@ -187,11 +187,6 @@ static void checkInheritanceClause(
187
187
const ExtensionDecl *ext = nullptr ;
188
188
const TypeDecl *typeDecl = nullptr ;
189
189
const Decl *decl;
190
-
191
- // / The suppressed implicit conformances are physically separate but part of
192
- // / the same syntactic inheritance clause sequence.
193
- checkSuppressedEntries (declUnion);
194
-
195
190
if ((ext = declUnion.dyn_cast <const ExtensionDecl *>())) {
196
191
decl = ext;
197
192
@@ -570,6 +565,7 @@ static void checkGenericParams(GenericContext *ownerCtx) {
570
565
571
566
for (auto gp : *genericParams) {
572
567
TypeChecker::checkDeclAttributes (gp);
568
+ assert (gp->getSuppressed ().empty () && " unexpected suppressed conformances" );
573
569
checkInheritanceClause (gp);
574
570
}
575
571
@@ -2544,6 +2540,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2544
2540
void visitAssociatedTypeDecl (AssociatedTypeDecl *AT) {
2545
2541
TypeChecker::checkDeclAttributes (AT);
2546
2542
2543
+ assert (AT->getSuppressed ().empty () && " unexpected suppressed conformances" );
2547
2544
checkInheritanceClause (AT);
2548
2545
auto *proto = AT->getProtocol ();
2549
2546
@@ -2625,6 +2622,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2625
2622
void visitEnumDecl (EnumDecl *ED) {
2626
2623
checkUnsupportedNestedType (ED);
2627
2624
2625
+ // Establish suppressed conformances early to support queries elsewhere.
2626
+ checkSuppressedEntries (ED);
2627
+
2628
2628
// FIXME: Remove this once we clean up the mess involving raw values.
2629
2629
(void ) ED->getInterfaceType ();
2630
2630
@@ -2696,6 +2696,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2696
2696
void visitStructDecl (StructDecl *SD) {
2697
2697
checkUnsupportedNestedType (SD);
2698
2698
2699
+ // Establish suppressed conformances early to support queries elsewhere.
2700
+ checkSuppressedEntries (SD);
2701
+
2699
2702
checkGenericParams (SD);
2700
2703
2701
2704
// Force lowering of stored properties.
@@ -2884,6 +2887,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2884
2887
void visitClassDecl (ClassDecl *CD) {
2885
2888
checkUnsupportedNestedType (CD);
2886
2889
2890
+ // Establish suppressed conformances early to support queries elsewhere.
2891
+ checkSuppressedEntries (CD);
2892
+
2887
2893
// Force creation of the generic signature.
2888
2894
(void ) CD->getGenericSignature ();
2889
2895
@@ -3051,6 +3057,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
3051
3057
void visitProtocolDecl (ProtocolDecl *PD) {
3052
3058
checkUnsupportedNestedType (PD);
3053
3059
3060
+ // Establish suppressed conformances early to support queries elsewhere.
3061
+ checkSuppressedEntries (PD);
3062
+
3054
3063
// Check for circular inheritance within the protocol.
3055
3064
(void ) PD->hasCircularInheritedProtocols ();
3056
3065
0 commit comments