@@ -3049,7 +3049,7 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
30493049
30503050 if (lowering.isTrivial () && !conformance) {
30513051 // A trivial type can lack a conformance in a few cases:
3052- // (1) containing or being a resilient type
3052+ // (1) containing or being a public, non-frozen type
30533053 // (2) containing or being a generic type which doesn't conform
30543054 // unconditionally but in this particular instantiation is trivial
30553055 // (3) being a special type that's not worth forming a conformance for
@@ -3082,8 +3082,11 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
30823082 return true ;
30833083 }
30843084
3085- // Resilient trivial types may not conform (case (1)).
3086- if (nominal->isResilient ())
3085+ // Public, non-frozen trivial types may not conform (case (1)).
3086+ if (nominal
3087+ ->getFormalAccessScope (/* useDC=*/ nullptr ,
3088+ /* treatUsableFromInlineAsPublic=*/ true )
3089+ .isPublic ())
30873090 return true ;
30883091
30893092 auto *module = nominal->getModuleContext ();
@@ -3149,8 +3152,11 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
31493152 return false ;
31503153 }
31513154
3152- // Resilient trivial types may not conform (case (1)).
3153- if (nominal->isResilient ())
3155+ // Public, non-frozen trivial types may not conform (case (1)).
3156+ if (nominal
3157+ ->getFormalAccessScope (/* useDC=*/ nullptr ,
3158+ /* treatUsableFromInlineAsPublic=*/ true )
3159+ .isPublic ())
31543160 return false ;
31553161
31563162 auto *module = nominal->getModuleContext ();
0 commit comments