[SR-13856] Compiler gets stuck trying to compile undefined keypath subscript access #56254
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
Xcode 12.2
Additional Detail from JIRA
md5: cc51a108530546b4e5689333b80bd7f0
Issue Description:
Overview: SwiftyUserDefaults offers a convenient interface for type safe access to user defaults. It allows access through type-checked keys using keypaths as well as @dynamicMemberLookup. The problem occurs when trying to use an undefined keypath.
I tried to reduce the example code as much as possible.
Reproduction steps:
Open example project, open `SwiftCompilerBugExample/Bug.swift`
Build SwiftyUserDefaults target with My Mac
Build completes in several seconds
Uncomment one of the problematic statements in `Bug.swift`
Try building again
Build does not complete in reasonable time
The text was updated successfully, but these errors were encountered: