You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PrintAsObjc] Import/fwd-declare the unbridged type for known types.
For non-Clang types that conform to `_ObjectiveCBridgeable` but have
type mappings defined in `getKnownTypeInfo`, always use the Clang type
in the mapping to determine which module to import.
`CGFloat` is a rare case of an `_ObjectiveCBridgeable` type that is
a native Swift `struct` declared in an overlay instead of extending
the original Clang decl with the conformance. Since `hasClangNode`
returns false in this case, it fell through to the rest of the logic
for `getObjCBridgedClass` and would forward declare `@class NSNumber`
instead of `@import CoreGraphics`. Thus, in some cases (e.g., the
header only defines APIs that use `CGFloat`), the header would be
invalid.
Fixes SR-14266.
0 commit comments