mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Otherwise we'd crash in CSApply since we'd have no type recorded for the var. rdar://127838305
20 lines
418 B
Swift
20 lines
418 B
Swift
// RUN: %batch-code-completion
|
|
|
|
@resultBuilder struct MyBuilder {
|
|
static func buildBlock(_ components: [Int]...) -> [Int]
|
|
static func buildFinalResult(_ component: [Int]) -> Int
|
|
}
|
|
|
|
func build(@MyBuilder itemsBuilder: () -> Int) {}
|
|
|
|
func test() {
|
|
let modifiers = build {
|
|
for modifier in invalid {
|
|
}
|
|
}
|
|
|
|
modifiers.#^COMPLETE^#
|
|
}
|
|
|
|
// COMPLETE: Keyword[self]/CurrNominal: self[#Void#]; name=self
|