-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Property Wrapper cannot be compiled correctly with $ in function body (Xcode 14 and main?)
#59295
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
property wrappers
Feature: property wrappers
type checker
Area → compiler: Semantic analysis
Comments
|
Hello, this stil fails nightly build, could anyone help checking it? |
|
Smaller reproducer: @propertyWrapper
struct WrapperValue {
var value: Bool
init(wrappedValue: Bool) {
self.value = wrappedValue
}
var wrappedValue: Bool {
get {
self.value
}
set {
self.value = newValue
}
}
}
let _ = { () -> () in
@WrapperValue var value = false
_value
} |
xedin
added a commit
to xedin/swift
that referenced
this issue
Aug 3, 2022
To support referencing projected and/or wrapped var in a closure solver needs to lookup a type of their originator and based on the wrapper type compute and assign types to projection and/or wrapper. Resolves: swiftlang#59295 Resolves: rdar://94506352
xedin
added a commit
to xedin/swift
that referenced
this issue
Aug 3, 2022
To support referencing projected and/or wrapped var in a closure solver needs to lookup a type of their originator and based on the wrapper type compute and assign types to projection and/or wrapper. Resolves: swiftlang#59295 Resolves: rdar://94506352
xedin
added a commit
to xedin/swift
that referenced
this issue
Aug 5, 2022
To support referencing projected and/or wrapped var in a closure solver needs to lookup a type of their originator and based on the wrapper type compute and assign types to projection and/or wrapper. Resolves: swiftlang#59295 Resolves: rdar://94506352
xedin
added a commit
to xedin/swift
that referenced
this issue
Aug 5, 2022
To support referencing projected and/or wrapped var in a closure solver needs to lookup a type of their originator and based on the wrapper type compute and assign types to projection and/or wrapper. Resolves: swiftlang#59295 Resolves: rdar://94506352 (cherry picked from commit 0989f43)
|
In Swift 5.7, it is not fixed yet. Please check with the code example in this issue's description @xedin |
This is investigated environment |
|
it looks fixed on Xcode 14.1 RC, thanks |
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
property wrappers
Feature: property wrappers
type checker
Area → compiler: Semantic analysis
Describe the bug
The code with Property Wrapper cannot be compiled correctly in Swift 5.7 dev (Xcode 14 dev)
This code had been compiled until Swift 5.6.1.
I already send it to apple (FB10059129)
To Reproduce
Compile above code.
Expected behavior
Compile success.
Screenshots
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: