Crash when accessing generic property wrapper's some
type-using wrappedValue
#78405
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
triage needed
This issue needs more specific labels
Description
The program below crashes the compiler.
Changing the type of
wrappedValue
to a non-some
type, or removing thewhere T: P
constraint from the property wrapper type makes it work fine.Additionally, it seems like the crash is caused by the fact that the program is accessing a property on the
wrappedValue
. If we changehmmm
to returnelements
instead ofelements.count
(and adjust its type accordingly), the program compiles without issues.Alternatively, removing the
where Self: Base
constraint from theP
protocol also makes it compile.Reproduction
Stack dump
Expected behavior
the code should compile
Environment
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx14.0
Additional information
No response
The text was updated successfully, but these errors were encountered: