[SR-11079] swiftc hang probably related to non-hashable subscript index in keypath #53471
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
key paths
Feature: key paths (both native and Objective-C)
type checker
Area → compiler: Semantic analysis
Environment
macOS Catalina beta 3 (10.15 Beta (19A501i))
Xcode 11 beta 3 (Version 11.0 beta 3 (11M362v))
Additional Detail from JIRA
md5: 588c5ee0915d4b9a964418b23bcc1156
Issue Description:
Here's the test case:
When I compile this on Catalina beta 3 (10.15 Beta (19A501i)) with the swiftc from Xcode 11 beta 3 (Version 11.0 beta 3 (11M362v)), the compiler hangs:
I tried to simplify the test case by removing the use of SwiftUI as follows:
But this doesn't make swiftc hang. Instead it emits an error and exits:
This leads me to believe that the hang is triggered in some way by
Doodad.Type
's lack of conformance toHashable
, but I don't know what's special aboutEnvironmentValues
.Note also that in the hanging case, I don't actually have to define
subscript(doodadFor🙂
to make swiftc hang. Defining it doesn't lead swiftc to terminate.The text was updated successfully, but these errors were encountered: