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-8112] Seemingly infinite compile times from untyped addition in a lambda #50644

Closed
swift-ci opened this issue Jun 26, 2018 · 1 comment
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself performance type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-8112
Radar None
Original Reporter re:fi.64 (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Performance, TypeChecker
Assignee None
Priority Medium

md5: e7f823fd46e7c551e27d4c4e41a59940

Issue Description:

This will have Swift churn for ~15 seconds before bailing with a message about the expression being too complex (adding a type annotation to result fixes the issue):

func fn<T>(_ a: T, _ b: (T) -> T) {}

fn(0) {(result) in
    result + result + (result + 1) + (result + 1)
}

Asked on the forums and was told to report this here.

@belkadan
Copy link
Contributor

Seems to be fixed in Swift 4.2! It's still a little slow but it's no longer timing out.

@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 performance type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants