Open
Description
Description
Conforming a noncopyable struct to a noncopyable protocol that requires a borrowing method with one that is consuming instead results in a compiler error asking to report the bug.
Reproduction
protocol Foo: ~Copyable {
borrowing func foo()
}
struct Bar: ~Copyable, Foo {
// Copy of noncopyable typed value. This is a compiler bug. Please file a bug with a small example of the bug
consuming func foo() {}
}
Expected behavior
A more specific error is reported due to the mismatch in the protocol conformance.
Environment
$ swiftc --version
swift-driver version: 1.127.4.2 Apple Swift version 6.2 (swiftlang-6.2.0.9.909 clang-1700.3.9.907)
Target: arm64-apple-macosx15.0
Additional information
No response