Files
swift-mirror/validation-test/IDE/issues_fixed/rdar127838305.swift
Hamish Knight cbbb1c9eca [CS] Avoid creating placeholder var if skipping for completion
Otherwise we'd crash in CSApply since we'd have no
type recorded for the var.

rdar://127838305
2024-05-17 15:46:40 +01:00

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