Skip to content

Commit 6a60588

Browse files
committed
[Tests] NFC: Add a test-case for rdar://125932231
1 parent 0a49d28 commit 6a60588

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/Concurrency/sendable_methods.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,12 @@ do {
260260
}
261261
}
262262
}
263+
264+
// rdar://125932231 - incorrect `error: type of expression is ambiguous without a type annotation`
265+
do {
266+
class C {}
267+
268+
func test(c: C) -> (any Sendable)? {
269+
true ? nil : c // Ok
270+
}
271+
}

0 commit comments

Comments
 (0)