We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Attachment: Download
Xcode 13.2+, MacOS Big Sur 11.6.2 (20G314)
It works fine with Xcode 12.5.x (same OS).
md5: e3860928bd2c149983e5f21966ce2448
Issue Description:
Not sure why it crashes, but in the attached source code file Swift 5.5.1 and Swift 5.5.2 crash on the following line:
public init<LV>(_ lhs: WritableKeyPath<L, LV>) where LV: Equatable, L == R
This constructor is inferred from the the `value` the keypath refers to.
I attached an example source code file (which also includes the stack trace).
Thanks.
The text was updated successfully, but these errors were encountered:
Reproduces in Xcode 13, but not on mainline. Seems like the requirement machine enablement tackled this.
Please verify that this crash is resolved in a nightly toolchain.
Sorry, something went wrong.
Comment by Alfons (JIRA)
@CodaFi Confirmed to work with the January 9, 2022 development snapshot. Thank you.
Edit: For good measure: also with the Swift 5.6 Snapshot of Jan 11, 2022
I was able to work around the issue by making swift infer a `convenience` constructor.
public final class PropertyMapping<L: AnyObject, R: AnyObject> { public init<V>(_ lhs: WritableKeyPath<L, V>, _ rhs: WritableKeyPath<R, V>) where V: Equatable { self.neglect = true } #if (swift(>=5.4) && swift(<5.5)) || swift(>=5.6) // Not in Swift 5.5 public init<LV>(_ lhs: WritableKeyPath<L, LV>) where LV: Equatable, L == R { self.neglect = true } #endif let neglect: Bool } #if (swift(>=5.5) && swift(<5.6)) public extension PropertyMapping where L == R { // Swift 5.5 only convenience init<LV>(_ lhs: WritableKeyPath<L, LV>) where LV: Equatable, L == R { self.init(lhs, lhs) } } #endif // Swift 5.5
(which is arguably also a sane approach)
Closed
No branches or pull requests
Attachment: Download
Environment
Xcode 13.2+, MacOS Big Sur 11.6.2 (20G314)
It works fine with Xcode 12.5.x (same OS).
Additional Detail from JIRA
md5: e3860928bd2c149983e5f21966ce2448
Issue Description:
Not sure why it crashes, but in the attached source code file Swift 5.5.1 and Swift 5.5.2 crash on the following line:
This constructor is inferred from the the `value` the keypath refers to.
I attached an example source code file (which also includes the stack trace).
Thanks.
The text was updated successfully, but these errors were encountered: