Files
swift-mirror/test/expr/closure/closures2.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()
}
}
}
}