-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.c interopFeature: Interoperability with CFeature: Interoperability with Cclang importerArea → compiler: The clang importerArea → compiler: The clang importer
Description
Description
I see the following behavior with an imported api:
// swift:
Cannot convert value of type 'UnsafeMutableRawPointer' to expected argument type 'UnsafeMutablePointer<UInt8>' because initializer 'init(x:y:interlaced:buffer:count:)' was not imported from C header
// imported api:
public init(x: Int32, y: Int32, interlaced: Bool, buffer: UnsafeMutablePointer<UInt8>, count: Int32)
// c header:
/// Video frame output structure.
///
/// Contains the generated video frame data and metadata.
typedef struct {
/// Horizontal resolution in pixels.
int x;
/// Vertical resolution in pixels.
int y;
/// Whether the frame is interlaced.
bool interlaced;
/// Pointer to the video frame buffer.
///
/// This buffer is owned by the host.
uint8_t* buffer;
/// Number of bytes in the buffer.
int count;
} video_frame_t SWIFT_NAME(VideoFrame);
Reproduction
See attached package.
Expected behavior
dont and allow implicit cast
Environment
Apple Swift version 6.2-dev (LLVM bba436f29ae40dd, Swift 6b29700)
Target: arm64-apple-macosx26.0
Build config: +assertions
Additional information
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.c interopFeature: Interoperability with CFeature: Interoperability with Cclang importerArea → compiler: The clang importerArea → compiler: The clang importer