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-13008] Getting "The compiler is unable to type-check this expression in reasonable time" after switch from Xcode 10.3 to Xcode 11 #55453

Closed
swift-ci opened this issue Jun 13, 2020 · 2 comments
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

@swift-ci
Copy link
Collaborator

Previous ID SR-13008
Radar None
Original Reporter RomanPodymov (JIRA User)
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

Xcode 11.5, Swift 5.2.

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

md5: b99a1c81a53627d1316c93826b295262

Issue Description:

Consider the following code:

func f(a: [(Int, Int)], b: String) -> [String] {
    let l = a.last!
    return [(l.0, l.1, "")].flatMap { m in
        a[0...].contains { $0.0 == m.0 && $0.1 == m.1 } ? [] : f(a: a + [(m.0, m.1)], b: b + m.2)
    }
}

It does not produce errors in Xcode 10.3, but in Xcode 11.5 getting "The compiler is unable to type-check this expression in reasonable time".

@LucianoPAlmeida
Copy link
Collaborator

Hey RomanPodymov (JIRA User)

Have you checked on 5.3 or master snapshot?

Here on master snapshot from 2020-05-22

It takes quite sometime but it typechecks at the end

![](Screen Shot 2020-06-13 at 19.50.06.png)

@swift-ci
Copy link
Collaborator Author

swift-ci commented Oct 7, 2020

Comment by Roman Podymov (JIRA)

The issue is not reproducing in Xcode 12.0.1.

@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

2 participants