mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
22 lines
407 B
Swift
22 lines
407 B
Swift
// 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()
|
|
}
|
|
}
|
|
}
|
|
}
|