Using a key path on a consumed object causes "copy of noncopyable typed value" warning. #76775
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
Compiling code that uses a ReferenceWritableKeyPath on an instance that has been constrained to AnyObject results in the error "copy of noncopyable typed value. This is a compiler bug. Please file a bug with a small example of the bug".
Reproduction
Expected behavior
Using a key path in this fashion does not result in an error.
Environment
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
Additional information
You can work around it by re-declaring the variable (like
let target = target
).The text was updated successfully, but these errors were encountered: