mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We failed to properly classify arguments that are of optional function type, in this case leading to a verification failure due to the throws attribute on the apply expression not being set to some value. Fixes: SR-9102 / rdar://problem/45615204
6 lines
108 B
Swift
6 lines
108 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
func test(_ a: [Int], _ f: ((Int) -> Bool)?) {
|
|
_ = a.filter(f!)
|
|
}
|