blob: 6afbf9c609f843671c884371388fe2e0c507624e [file] [log] [blame]
// RUN: %target-typecheck-verify-swift
func frob(x: inout Int) {}
func foo() {
let x: Int // expected-note* {{}}
x = 0
_ = { frob(x: x) }() // expected-error{{'x' is a 'let'}}
_ = { x = 0 }() // expected-error{{'x' is a 'let'}}
_ = { frob(x: x); x = 0 }() // expected-error 2 {{'x' is a 'let'}}
}