ITADN

Failed to produce diagnostic for expression for bad Swift

#89985OpenFareekDev 创建于 2026-06-16
triage needed
F
FareekDevcommented
### Description The compiler produces ``` error: failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs) ``` when trying to parse a semantically invalid assignment of an array of tuples to a tuple. See reproduction for a very simple test case. ### Reproduction ```swift struct A: Equatable { let i: Int let msg: String? init(_ i: Int, _ m: String? = nil) { self.i = i self.msg = m } } @main struct Main { @inline(never) static func main() { let array: (A, A, (A, A) -> Bool) = [ (A(7), A(3), ==) ] } } ``` ### Expected behavior I expected an error message saying that the types were incompatible. ### Environment swift-driver version: 1.148.6 Apple Swift version 6.3.2 (swiftlang-6.3.2.1.108 clang-2100.1.1.101) Target: arm64-apple-macosx26.0 ### Additional information It's trivial to fix the assignement's type or just remove it.
0 条评论