Files
swift-mirror/test/Macros/SwiftifyImport/MacroErrors/Pointee.swift
Henrik G. Olsson 993929c3e1 Merge pull request #81752 from hnrklssn/swiftify-sized-sizedby
[Swiftify] Support __sized_by on byte-sized pointee types

(cherry picked from commit 89b09a69e4)
2025-06-10 21:49:52 +02:00

14 lines
561 B
Swift

// REQUIRES: swift_swift_parser
// RUN: %target-typecheck-verify-swift -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -verify
// expected-error@+2{{void pointers not supported for countedBy}}
@_SwiftifyImport(.countedBy(pointer: .param(1), count: "count"))
func myFunc(_ ptr: UnsafeRawPointer, _ count: CInt) {
}
// expected-error@+2{{void pointers not supported for countedBy}}
@_SwiftifyImport(.countedBy(pointer: .param(1), count: "count"))
func myFunc(_ ptr: OpaquePointer, _ count: CInt) {
}