Avatar
Avatar
Iceman
@swift-main protocol P<A> { associatedtype A } protocol Q {} func f(_ v: any P<Int>) {} func g(_ v: any (P<Int> & Q)) {} func h(_ v: any (P & Q)) {} (edited)
swiftNightly BOT 6/13/2024 10:05 AM
exit status: 1 with <stdin>:6:18: error: non-protocol, non-class type 'P<Int>' cannot be used within a protocol-constrained type 4 | protocol Q {} 5 | func f(_ v: any P<Int>) {} 6 | func g(_ v: any (P<Int> & Q)) {} | `- error: non-protocol, non-class type 'P<Int>' cannot be used within a protocol-constrained type 7 | func h(_ v: any (P & Q)) {} 8 | (edited)