[SR-13869] ManagedBufferPointer's header property should have nonmutating setter #56267
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Environment
Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Target: x86_64-apple-darwin19.6.0
Additional Detail from JIRA
md5: b373a44203d77dd35d0394ac0765ce07
Issue Description:
ManagedBufferPointer
has aheader
property that provides quick access to the header. Unfortunately its setter requires the pointer itself to be mutable, even though no other usage of this type (includingwithUnsafeMutablePointerToHeader(_:)
) has this requirement, and the type itself is supposed to act as a pointer. This seems like an oversight.The text was updated successfully, but these errors were encountered: