-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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.move-onlyFeature → type declarations: Move-only type declarationsFeature → type declarations: Move-only type declarations
Description
Description
The following code fails to compile using Xcode 15b8:
struct Example: ~Copyable {
private var failureString: String { "Goodbye." }
deinit { fatalError("FATAL ERROR: \(failureString)") }
}
It produces the error:
Usage of a noncopyable type that compiler can't verify. This is a compiler bug. Please file a bug with a small example of the bug
Steps to reproduce
Cut and paste the above struct into a playground and observe the compiler error
Expected behavior
It should compile and, when run, the deinit should cause a fatal error to occur with the correct error message.
Environment
- Swift Version: swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)
Target: arm64-apple-macosx13.0 - Xcode Version: Xcode 15.0, Build version 15A5229m
- Deployment target: all
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.move-onlyFeature → type declarations: Move-only type declarationsFeature → type declarations: Move-only type declarations