@@ -3049,7 +3049,7 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
3049
3049
3050
3050
if (lowering.isTrivial () && !conformance) {
3051
3051
// 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
3053
3053
// (2) containing or being a generic type which doesn't conform
3054
3054
// unconditionally but in this particular instantiation is trivial
3055
3055
// (3) being a special type that's not worth forming a conformance for
@@ -3082,8 +3082,11 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
3082
3082
return true ;
3083
3083
}
3084
3084
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 ())
3087
3090
return true ;
3088
3091
3089
3092
auto *module = nominal->getModuleContext ();
@@ -3149,8 +3152,11 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
3149
3152
return false ;
3150
3153
}
3151
3154
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 ())
3154
3160
return false ;
3155
3161
3156
3162
auto *module = nominal->getModuleContext ();
0 commit comments