mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Only fully resolved substitutions are eligible to be considered as conflicting, if holes are involved in any position that automatically disqualifies a generic parameter. Resolves: rdar://108534555 Resolves: https://github.com/apple/swift/issues/63450
28 lines
559 B
Swift
28 lines
559 B
Swift
// RUN: %target-typecheck-verify-swift -target %target-cpu-apple-macosx10.15 -swift-version 5 -disable-availability-checking
|
|
|
|
// REQUIRES: objc_interop
|
|
// REQUIRES: OS=macosx
|
|
|
|
import SwiftUI
|
|
|
|
struct Item: Identifiable {
|
|
var id: Int
|
|
var title: String
|
|
}
|
|
|
|
struct MyGroup<Content> {
|
|
init(@ViewBuilder _: () -> Content) {}
|
|
}
|
|
|
|
struct Test {
|
|
let s: [Item]
|
|
|
|
func test() {
|
|
MyGroup {
|
|
ForEach(s) {
|
|
Button($0.title) // expected-error {{value of type 'String' to expected argument type 'PrimitiveButtonStyleConfiguration'}}
|
|
}
|
|
}
|
|
}
|
|
}
|