public class FooMock: Foo {
public init() { }
public private(set) var bizCallCount = 0
public var bizArgValues = [String]()
public var bizHandler: ((String) -> (Bool))?
public func biz(for: String) -> Bool {
bizCallCount += 1
bizArgValues.append(for)
if let bizHandler = bizHandler {
return bizHandler(`for`)
}
return false
}
}
And this does not compile because for is not escaped in bizArgValues.append(for)
This produces non-compilable result:
Results in
And this does not compile because
for
is not escaped inbizArgValues.append(for)