Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-13856] Compiler gets stuck trying to compile undefined keypath subscript access #56254

Closed
robinkunde opened this issue Nov 13, 2020 · 4 comments
Assignees
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

Comments

@robinkunde
Copy link
Contributor

Previous ID SR-13856
Radar rdar://problem/71383770
Original Reporter @robinkunde
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

Xcode 12.2

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, TypeChecker
Assignee @robinkunde
Priority Medium

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:

  1. Open example project, open `SwiftCompilerBugExample/Bug.swift`

  2. Build SwiftyUserDefaults target with My Mac

  3. Build completes in several seconds

  4. Uncomment one of the problematic statements in `Bug.swift`

  5. Try building again

  6. Build does not complete in reasonable time

@beccadax
Copy link
Contributor

@swift-ci create

@xedin
Copy link
Member

xedin commented Dec 15, 2020

Fixed by #35089 @robinkunde please use the next available main branch snapshot to verify and close this issue.

@robinkunde
Copy link
Contributor Author

@xedin I tested with the 12/20 snapshot and can confirm the issue is fixed.

@xedin
Copy link
Member

xedin commented Dec 29, 2020

Thank you for confirming!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants