Skip to content

Commit 06486f6

Browse files
committed
[NFC] Add a test case for missing 'try' diagnostics with existential opening.
1 parent 3daa875 commit 06486f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/decl/func/rethrows.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,3 +650,12 @@ func callsOptionalRethrowsDefaultArg2() throws {
650650
optionalRethrowsDefaultArg2(nil)
651651
try optionalRethrowsDefaultArg2 { throw SomeError.Badness }
652652
}
653+
654+
protocol P1 {
655+
var id: Int { get }
656+
func test(_: some Sequence) -> [any P1]
657+
}
658+
659+
func open(p: any P1, s: any Sequence) throws {
660+
_ = p.test(s).map(\.id)
661+
}

0 commit comments

Comments
 (0)