mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When we are completing inside a function signature, the function doesn’t have a body. We were still running `PreCheckResultBuilderApplication`, which crashed if the body was `nullptr`. rdar://111489024
12 lines
435 B
Swift
12 lines
435 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
|
|
|
|
@resultBuilder struct MyBuilder {
|
|
static func buildBlock() -> Int
|
|
static func buildBlock<Content>(_ content: Content) -> Content
|
|
}
|
|
|
|
@MyBuilder func test(action: () -> #^COMPLETE^#Void) {}
|
|
|
|
// COMPLETE: Decl[TypeAlias]/OtherModule[Swift]/IsSystem: Void[#Void#]; name=Void
|