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-13826] Failed to produce diagnostic on trying to capture parameter of non-escaping closure #56224

Closed
Gotyanov opened this issue Nov 4, 2020 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation failed to produce diagnostic Bug → internal error: Failed to produce diagnostic for expression type checker Area → compiler: Semantic analysis

Comments

@Gotyanov
Copy link

Gotyanov commented Nov 4, 2020

Previous ID SR-13826
Radar rdar://problem/71039314
Original Reporter @Gotyanov
Type Bug
Status Closed
Resolution Cannot Reproduce
Environment

XCode 12.2 beta 3

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

md5: 4cf2f384a577b1e9456ed3082385e5d9

Issue Description:

class Lifetime { }

func withLifetime(_ action: (Lifetime) -> Void) { }

func subscribe(_ action: @escaping () -> Void) { }

withLifetime { lifetime in
    subscribe { [lifetime] in // Failed to produce diagnostic for expression; please file a bug report
    }
}
@typesanitizer
Copy link

Slightly reduced example:

class X { }
func withX(_: (X) -> Void) { }
withX { x in { [x] in }() }

@typesanitizer
Copy link

@swift-ci create

@xedin
Copy link
Member

xedin commented Nov 6, 2020

@Gotyanov I can't reproduce this issue with snapshot of main branch from swift.org, could you give it a try as well?

@Gotyanov
Copy link
Author

Gotyanov commented Nov 7, 2020

I am not able to reproduce the issue with XCode 12.1 + Swift Development Snapshot 2020-11-05

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added failed to produce diagnostic Bug → internal error: Failed to produce diagnostic for expression type checker Area → compiler: Semantic analysis diagnostics QoI Bug: Diagnostics Quality of Implementation labels Dec 22, 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 diagnostics QoI Bug: Diagnostics Quality of Implementation failed to produce diagnostic Bug → internal error: Failed to produce diagnostic for expression type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

4 participants