Skip to content

Commit 86c33e3

Browse files
committed
[TypeChecker] NFC: Add a test-case for rdar://85263844 regression
1 parent ce77849 commit 86c33e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Constraints/construction.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,9 @@ func test_that_optionality_of_closure_result_is_preserved() {
264264
a.flatMap { (group: [S]) -> [S]? in s.map { group + [$0] } } // Ok
265265
})
266266
}
267+
268+
// rdar://85263844 - initializer 'init(_:)' requires the types be equivalent
269+
func rdar85263844(arr: [(q: String, a: Int)]) -> AnySequence<(question: String, answer: Int)> {
270+
AnySequence(arr.map { $0 }) // FIXME: This is supposed to type-check.
271+
// expected-error@-1 {{initializer 'init(_:)' requires the types '(question: String, answer: Int)' and '(q: String, a: Int)' be equivalent}}
272+
}

0 commit comments

Comments
 (0)