We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9cfe28 commit 8090e39Copy full SHA for 8090e39
test/Generics/inverse_generics.swift
@@ -514,3 +514,9 @@ extension Yapping { // expected-note {{'where T: Copyable' is implicit here}}
514
func testYap(_ y: Yapping<NC>) {
515
y.yap() // expected-error {{referencing instance method 'yap()' on 'Yapping' requires that 'NC' conform to 'Copyable'}}
516
}
517
+
518
+protocol Veggie: ~Copyable {}
519
+func generalized(_ x: Any.Type) {}
520
+func testMetatypes(_ t: (any Veggie & ~Copyable).Type) {
521
+ generalized(t) // expected-error {{cannot convert value of type '(any Veggie & ~Copyable).Type' to expected argument type 'any Any.Type'}}
522
+}
0 commit comments