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-15774] Error "the compiler is unable to type-check this expression in reasonable time" for what should be a fairly trivial expression #58051

Open
swift-ci opened this issue Jan 26, 2022 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-15774
Radar None
Original Reporter aaargh! (JIRA User)
Type Bug
Environment

IDE/Compiler: XCode version 13.2.1 (13C100), Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)

OS: macOS 12.1

Arch: Arm64

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: d350d8f547493a4f867fe9cd4741de79

Issue Description:

The following code causes the compiler to fail with an "the compiler is unable to type-check this expression in reasonable time" error.

fileprivate extension URLSessionTaskTransactionMetrics {
    
    var timeOfLastEvent: Date? {
        responseEndDate ?? responseStartDate ?? requestEndDate ?? requestStartDate ?? connectEndDate ?? secureConnectionEndDate ?? secureConnectionStartDate ?? connectStartDate ?? domainLookupEndDate ?? domainLookupStartDate ?? fetchStartDate
    }
}

All properties here are of type Date?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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
Projects
None yet
Development

No branches or pull requests

1 participant