File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -684,13 +684,18 @@ namespace {
684
684
auto typedefBridgeability = getTypedefBridgeability (underlyingType);
685
685
686
686
// Figure out the typedef we should actually use.
687
- SwiftTypeConverter innerConverter (Impl, AllowNSUIntegerAsInt, Bridging);
687
+ auto underlyingBridgeability =
688
+ (Bridging == Bridgeability::Full
689
+ ? typedefBridgeability : Bridgeability::None);
690
+ SwiftTypeConverter innerConverter (Impl, AllowNSUIntegerAsInt,
691
+ underlyingBridgeability);
688
692
auto underlyingResult = innerConverter.Visit (underlyingType);
689
693
690
694
// If we used different bridgeability than this typedef normally
691
- // would, and therefore the underlying type is different from the
692
- // mapping of the typedef, use the underlying type.
693
- if (Bridging != typedefBridgeability &&
695
+ // would because we're in a non-bridgeable context, and therefore
696
+ // the underlying type is different from the mapping of the typedef,
697
+ // use the underlying type.
698
+ if (underlyingBridgeability != typedefBridgeability &&
694
699
!underlyingResult.AbstractType ->isEqual (mappedType)) {
695
700
return underlyingResult;
696
701
}
You can’t perform that action at this time.
0 commit comments