I found this LLVM compiler crash when updating a project for building with Xcode 8. At first I thought it had to do with #if DEBUG because the crash didn’t occur when I removed the conditional compiling block. But further experimentation showed that it is a specific line in this block that is causing the issue.
It is filed as rdar://28318984 and on Open Radar.
The Xcode editor accepts the mentioned code as valid, but LLVM on building seg-faults.
Steps to Reproduce
Paste this line into a single-view iOS app:
try! JSONSerialization.data(withJSONObject: !, options: )
- Both the Xcode syntax checker as well as LLVM should report the parameter as invalid.
- Xcode editor accepts the code as stated
- LLVM seg-faults (see attached screenshot)
Version 8.0 (8A218a), macOS 10.11.6 (15G31)
Might be coming from the first parameter’s type gotten changed to an Any in the the Grand Renaming. But it is a mystery to me why ! would be a valid Any.
Also published on Medium.
Categories: Bug Reports