Open
Description
Description
The code below generates a "Failed to produce diagnostic for expression" error at the var body
line.
The cause is the incorrect use of lowercase foo
in the array declaration, and the compiler also generates the valid "Cannot find type 'foo' in scope" error on that line.
However, it should not generate the failed diagnostic message.
The issue can be reproduced by pasting the code into a playground.
Reproduction
import SwiftUI
struct Foo {
}
struct V: View {
var body: some View {
let foos: [foo]
}
}
Expected behavior
The "Failed to produce diagnostic for expression" should not be generated
Environment
swift-driver version: 1.120.5 Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
Target: arm64-apple-macosx15.0
And
swift-driver version: 1.127.4.2 Apple Swift version 6.2 (swiftlang-6.2.0.9.909 clang-1700.3.9.907)
Target: arm64-apple-macosx15.0
Additional information
No response