[SR-7978] Referencing class from library in test target causes a DESERIALIZATION FAILURE #50512
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
serialization
Area → compiler: Serialization & deserialization
Attachment: Download
Environment
Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)
Target: x86_64-apple-darwin17.6.0
Additional Detail from JIRA
md5: 0ee1b1bcf86099d95e02805c261a0824
Issue Description:
This bug seems to require a certain constellation. The following steps worked for me to reproduce it:
First, create Swift Package with:
Then replace the contents of Sources/DeserializationCrash/DeserializationCrash.swift with the following code:
Next, open Tests/DeserializationCrashTests/DeserializationCrashTests.swift and replace the contents of the
func testExample()
with the following line:Finally, run
swift test
. The compilation of the test target will fail with the following output:I've also attached zip with the failing project.
The text was updated successfully, but these errors were encountered: