Segmentation fault: 11 when trying to resolve generic function with KeyPath
Originator: | anton.siliuk | ||
Number: | rdar://50271944 | Date Originated: | April 27 2019 |
Status: | Open | Resolved: | - |
Product: | Xcode, swift | Product Version: | 10.2.1, 5.0 |
Classification: | Bug | Reproducible: | Always |
Summary: In comment you can see an example of generic function with KeyPath. And Compiler fails to compile it. This reproduces on lates swift 5 and on older swift 4.2 and Xcode 10.1 Can be fixed by making `label` a `var` property Steps to Reproduce: 1. Open example project 2. Try to run it Expected Results: Example project compiles Actual Results: Compilation segfaults with error Version/Build: Xcode 10.2.1 swift 5
Comments
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!
Code that produces compile error
class ViewController: UIViewController {
}
struct Style {
let apply: (V) -> V
}
extension Style where V: UILabel {
}
extension Style {
}
extension Style where V: ViewController {
}