mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We set the type of ParamDecls when applying solutions in the normal path, but sometimes code completion will type check an expression inside a closure without checking the outer expression. In this case, we may have inferred a type for the ParamDecl, but we don't write it back. Instead, just look at the DeclRefExpr's type. Fixes <rdar://problem/42098113>.
9 lines
173 B
Swift
9 lines
173 B
Swift
// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename %s
|
|
|
|
func test() {
|
|
let cl = { arg in
|
|
let name = arg as String
|
|
#^A^#
|
|
}
|
|
}
|