Closed fibrechannelscsi closed 4 months ago
@asl
Thanks @fibrechannelscsi
This is yet another instance of broken Optional
differentiation. And yet another case when we're having zero test coverage for some code paths. Certainly they are broken when they are finally hit :)
Description
The code shown below causes the compiler to crash when built in either Debug or Release mode.
The full assertion failure is:
Assertion failed: (!Src->getType().isAddress()), function emitStoreValueOperation, file SILBuilder.h, line 925.
This line number corresponds to the 6.0 Development Snapshot toolchain, 2024-05-26a.Reproduction
Copy and paste the code below into a new project and build in either Debug or Release mode.
Stack dump
Expected behavior
The program should compile successfully, or, the compiler should generate an error message indicating why the compilation cannot succeed.
Environment
This affects several toolchains: Swift 6.0 Development Snapshot 2024-05-26a
Nightly toolchains: 2023-12-07a 2024-06-13a
Additional information
This issue may or may not be related; it is the only search result found when looking for
emitStoreValueOperation
. https://github.com/swiftlang/swift/issues/55223