Open
Description
Description
When building this sample code, I'm getting this error message
Repro.swift:2:7: error: 'arena' has an unexpected exclusivity violation. This is a compiler bug.
Please file a bug with a small example of the bug
Reproduction
func modify() {
var arena = Arena()
arena.modify { $0 += 1 }
}
private struct Arena: ~Copyable {
func modify(modifier: (inout Int) throws -> ()) rethrows {
}
}
Expected behavior
This code compiles or provides clear actionable diagnostic message.
Environment
swift-DEVELOPMENT-SNAPSHOT-2024-01-15-a-osx from https://swift.org/download
Apple Swift version 5.11-dev (LLVM e2b71339d3295a4, Swift 8ae3ee9)
Target: arm64-apple-macosx14.0