blob: cf27396999f52bb8fb0955a076288d413ae7f198 [file] [log] [blame]
// RUN: not %target-swift-frontend %s -sil-verify-all -c 2>&1 | %FileCheck %s
// Report the error but don't crash.
// CHECK: error: closure captures 'stringList' before it is declared
class TestUndefined {
private var stringList: [String]!
func dontCrash(strings: [String]) {
assert(stringList.allSatisfy({ $0 == stringList.first!}))
let stringList = strings.filter({ $0 == "a" })
}
}