mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[test] Add tracking test for https://github.com/swiftlang/swift/issues/85587
This commit is contained in:
21
test/expr/closure/closures2.swift
Normal file
21
test/expr/closure/closures2.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
// RUN: %target-typecheck-verify-swift
|
||||
|
||||
// https://github.com/swiftlang/swift/issues/85587
|
||||
do {
|
||||
struct Mootex<T> {
|
||||
func withLock<Result>(_: (T) -> Result) -> Result {}
|
||||
}
|
||||
|
||||
func never() -> Never {}
|
||||
|
||||
struct Test {
|
||||
let _i = Mootex<Int>()
|
||||
|
||||
var i: Int {
|
||||
// expected-error@+1:10 {{failed to produce diagnostic for expression}}
|
||||
_i.withLock { _ in
|
||||
never()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user