This commit is contained in:
Anthony Latsis
2025-11-19 16:10:44 +00:00
parent 403bb36f8e
commit 91d2323b16

View 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()
}
}
}
}