Skip to content

Commit 01360d1

Browse files
Merge pull request #85588 from swiftlang/jepa-main2
[test] Add tracking test for #85587
2 parents 0e55f81 + 91d2323 commit 01360d1

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)