Skip to content

Commit 91d2323

Browse files
committed
[test] Add tracking test for #85587
1 parent 403bb36 commit 91d2323

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/expr/closure/closures2.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
// https://github.com/swiftlang/swift/issues/85587
4+
do {
5+
struct Mootex<T> {
6+
func withLock<Result>(_: (T) -> Result) -> Result {}
7+
}
8+
9+
func never() -> Never {}
10+
11+
struct Test {
12+
let _i = Mootex<Int>()
13+
14+
var i: Int {
15+
// expected-error@+1:10 {{failed to produce diagnostic for expression}}
16+
_i.withLock { _ in
17+
never()
18+
}
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)