Xcode 9 beta 4: compiler crash when querying \NSLayoutConstraint.firstItem as key path

Number:rdar://33743416 Date Originated:06-Aug-2017 03:18 AM
Status:Resolved Resolved:August 9 2017, 12:53 PM
Product:Developer Tools Product Version:swiftlang-900.0.54.11 clang-900.0.31
Classification:Crash/Hang/Data Loss Reproducible:Always
Attempting to use \NSLayoutConstraint.firstItem in Swift will cause the compiler to crash.

Steps to Reproduce:
1. Open Terminal.
2. Enter the Swift REPL by typing `swift`.
3. Type `import AppKit`.
4. Type `\NSLayoutConstraint.firstItem`.

Expected Results:
The REPL prints the resulting KeyPath value for the specified property, firstItem.

Actual Results:
Segfault. See attached crash log, also uploaded at https://cl.ly/lsp3

swiftlang-900.0.54.11 clang-900.0.31

No crash on \NSLayoutConstraint.firstAttribute.


Apple Developer Relations

We believe this issue is resolved in the latest Xcode 9 beta.

Please test with the latest Xcode beta. If you still have issues, please update your bug report with any relevant logs or information that could help us investigate.

Cross-posted at https://bugs.swift.org/browse/SR-5634

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!