Skip to content

Commit 8090e39

Browse files
committed
NCGenerics: fix "vague diagnostic for locator"
resolves the assertion failure in rdar://125196271 but not the underlying issue.
1 parent c9cfe28 commit 8090e39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Generics/inverse_generics.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,3 +514,9 @@ extension Yapping { // expected-note {{'where T: Copyable' is implicit here}}
514514
func testYap(_ y: Yapping<NC>) {
515515
y.yap() // expected-error {{referencing instance method 'yap()' on 'Yapping' requires that 'NC' conform to 'Copyable'}}
516516
}
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

Comments
 (0)