-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
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.off topicResolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.)Resolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.)swift 5.7
Description
Description
TransferRepresentationBuilder does not work.
Steps to reproduce
This code can't be built
import CoreTransferable
@available(macOS 13.0, *)
struct Proxy: Transferable {
static var transferRepresentation: some TransferRepresentation {
FileRepresentation(exportedContentType: .mpeg4Movie) { (item: Proxy) -> SentTransferredFile in
let fileURL = URL(filePath: "")
return SentTransferredFile(fileURL)
}.visibility(.all)
}
}
These some error if I add ".visibility(.all)"
I have to change the above code to this so the complier can work
import CoreTransferable
@available(macOS 13.0, *)
struct Proxy: Transferable {
static var transferRepresentation: some TransferRepresentation {
let fileRepresentation = FileRepresentation(exportedContentType: .mpeg4Movie) { (item: Proxy) -> SentTransferredFile in
let fileURL = URL(filePath: "")
return SentTransferredFile(fileURL)
}
return fileRepresentation.visibility(.all)
}
}
Expected behavior
TransferRepresentationBuilder can work
Environment
- Swift compiler version info 5.7.2
- Xcode version info Xcode 14.2
- Deployment target: macOS 13.2.1
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.off topicResolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.)Resolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.)swift 5.7