test: Add regression test for rdar://91922018

This commit is contained in:
Anthony Latsis
2025-02-09 05:16:45 +00:00
parent d620886106
commit 07a6612e5f

View File

@@ -552,3 +552,16 @@ do {
}
}
}
// rdar://91922018
do {
func f<E>(_ c: some Collection<E>) -> some Collection<E> {
return c
}
let c: any Collection<Int>
let result = f(c)
do {
var types = SwiftTypePair(typeOf: result, type2: SwiftType<any Collection<Int>>.self)
types.assertTypesAreEqual()
}
}