mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A call to `SanitizeExpr` has been incorrectly removed from `typeCheckForCodeCompletion` by refactoring to use `ASTNode`. It is still required because fallback calls could have partially type-checked AST. Resolves: https://github.com/apple/swift/issues/59315 Resolves: rdar://94619388
9 lines
240 B
Swift
9 lines
240 B
Swift
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token COMPLETE
|
|
|
|
func foo(closure: (String) -> Void) -> String? {
|
|
return nil
|
|
}
|
|
|
|
func test() {
|
|
if let key = foo(closure: { str in str.suffix(2) == #^COMPLETE^#
|