mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Otherwise, when the horrible ExprCleanser comes along, it will set the interface type of the ParamDecl to nullptr. However there is no way to clear the 'validation started' bit, so the next time validateDecl() is called on this ParamDecl we will just return, causing crashes downstream when callers expect it to already have an interface type set. Fixes <rdar://problem/38189778> and possibly some instances of <rdar://problem/36434823>.
14 lines
341 B
Swift
14 lines
341 B
Swift
// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
|
|
|
|
struct Horse {
|
|
init(saddle: @escaping (_ height: Float) -> Float) {}
|
|
}
|
|
|
|
func myHorse() -> Horse {
|
|
return Horse(
|
|
saddle: { (height) -> Float in
|
|
let stirrups: #^A^#Float = 30
|
|
return height - stirrups
|
|
})
|
|
}
|