File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -424,3 +424,16 @@ public struct Record<Output> {
424
424
}
425
425
protocol P { }
426
426
extension Record : Decodable where Output : P { }
427
+
428
+ // Expect that if Copyable is an inherited protocol, then conditional
429
+ // conformances carry that through, making the Blahaj conditionally Copyable.
430
+ struct Blahaj < Value> : ~ Copyable {
431
+ deinit { } // expected-error {{deinitializer cannot be declared in generic struct 'Blahaj' that conforms to 'Copyable'}}
432
+ }
433
+ extension Blahaj : Q where Value: Q { }
434
+ protocol Q : Copyable { }
435
+
436
+ // expected-note@+2 3{{add}}
437
+ // expected-error@+1 {{parameter of noncopyable type 'Blahaj<T>' must specify ownership}}
438
+ func testBlahaj< T, U: Q > ( _ x: Blahaj < T > ,
439
+ _ y: Blahaj < U > ) { }
You can’t perform that action at this time.
0 commit comments