mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When we replay a solution, we must record changes in the trail, so fix the logic to do that. This fixes the first assertion failure with this test case. The test case also exposed a second issue. We synthesize a CustomAttr in applySolutionToClosurePropertyWrappers() with a type returned by simplifyType(). Eventually, CustomAttrNominalRequest::evaluate() looks at this type, and passes it to directReferencesForType(). Unfortunately, this entry point does not understand type aliases whose underlying type is a type parameter. However, directReferencesForType() is the wrong thing to use here, and we can just call getAnyNominal() instead. Fixes rdar://139237781.
31 lines
515 B
Swift
31 lines
515 B
Swift
// RUN: %target-typecheck-verify-swift -target %target-cpu-apple-macosx12
|
|
|
|
// REQUIRES: objc_interop
|
|
// REQUIRES: OS=macosx
|
|
|
|
import SwiftUI
|
|
|
|
struct V: View {
|
|
struct M: Identifiable {
|
|
let id: String
|
|
}
|
|
|
|
class C: ObservableObject {
|
|
@Published var m: [M]
|
|
|
|
init() {
|
|
self.m = []
|
|
}
|
|
}
|
|
|
|
@ObservedObject var c: C
|
|
|
|
var body: some View {
|
|
Table($c.m) {
|
|
TableColumn("") { $entry in
|
|
Text("hi")
|
|
}
|
|
}
|
|
}
|
|
}
|