[SR-15593] Failed to produce diagnostic for expression; case let in Swift UI view #57896
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
failed to produce diagnostic
Bug → internal error: Failed to produce diagnostic for expression
SwiftUI
Flag: Related to (but not an issue with) SwiftUI
type checker
Area → compiler: Semantic analysis
Environment
macOS 12.1
Mac mini (M1, 2020)
Target: arm64-apple-darwin21.2.0
Additional Detail from JIRA
md5: 5e44586f8b9fb1096757f6f3b30bdfb6
Issue Description:
A concise description of the problem:
In a SwiftUI View, when using "if case let" with a case with at least 3 associated values, if you only specify the first two associated values (but not the third) the compiler produces the error: "failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project"
Expected behavior:
The compiler should produce a diagnostic that says "your missing the third associated value" or at the very least produce the "type of expression is ambiguous without more context" error.
A reproducible test case:
The text was updated successfully, but these errors were encountered: