Files
swift-mirror/validation-test/IDE/issues_fixed/issue-75845.swift
Hamish Knight 5d93006d4c [Sema] Avoid folding sequences multiple times for completion
Completion can end up calling into pre-checking multiple times in
certain cases, make sure we don't attempt to fold a SequenceExpr
multiple times since its original AST is in a broken state
post-folding. Instead, just return the already-folded expression.

rdar://133717866
2025-07-14 17:49:23 +01:00

18 lines
373 B
Swift

// RUN: %batch-code-completion
// https://github.com/apple/swift/issues/75845
// Make sure we don't crash.
struct Foo {
init() {
do {
} catch {
#^A^#self#^B^# = #^C^#error#^D^#
}
}
}
// A: Decl[LocalVar]/Local: error[#any Error#]; name=error
// B: Begin completions
// C: Decl[LocalVar]/Local: error[#any Error#]; name=error
// D: Begin completions