mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
25 lines
545 B
Swift
25 lines
545 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
|
|
|
|
struct MyStruct {
|
|
func takeAnotherClosure(_ y: () -> Void) {}
|
|
}
|
|
|
|
func takeClosure(_ x: () -> Void) -> MyStruct {}
|
|
|
|
func foo() {
|
|
takeClosure {
|
|
#^COMPLETE^#
|
|
}.takeAnotherClosure {
|
|
if true {
|
|
1
|
|
} else {
|
|
1
|
|
}
|
|
}
|
|
}
|
|
|
|
// COMPLETE: Begin completions
|
|
// COMPLETE: Decl[Struct]/CurrModule: MyStruct[#MyStruct#]; name=MyStruct
|
|
// COMPLETE: End completions
|