-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Swift compiler emit wrong error with optional variable in closure #81770
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
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
expressions
Feature: expressions
Comments
This is happening because the solver doesn't propagate placeholders to missing members aggressively enough, I'm working on a fix for this. |
xedin
added a commit
to xedin/swift
that referenced
this issue
May 26, 2025
Without contextual information it won't be possible to bind a missing member to a concrete type later, so let's bind them eagerly and propagate placeholders outward. Resolves: rdar://152021264 Resolves: swiftlang#81770
i am getting the same error. I can't make heads or tails of it. Is this a bug in Swift? |
xedin
added a commit
to xedin/swift
that referenced
this issue
May 29, 2025
Without contextual information it won't be possible to bind a missing member to a concrete type later, so let's bind them eagerly and propagate placeholders outward. Resolves: rdar://152021264 Resolves: swiftlang#81770
xedin
added a commit
to xedin/swift
that referenced
this issue
May 30, 2025
Without contextual information it won't be possible to bind a missing member to a concrete type later, so let's bind them eagerly and propagate placeholders outward. Resolves: rdar://152021264 Resolves: swiftlang#81770
Yes, it's a bug. |
xedin
added a commit
to xedin/swift
that referenced
this issue
Jun 3, 2025
Without contextual information it won't be possible to bind a missing member to a concrete type later, so let's bind them eagerly and propagate placeholders outward. Resolves: rdar://152021264 Resolves: swiftlang#81770 (cherry picked from commit 10186d6)
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 itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
expressions
Feature: expressions
Originally posted by @WeijunDeng in #81602
The text was updated successfully, but these errors were encountered: