[SR-15767] Failed to produce diagnostic for expression #58044
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
code completion
Area → source tooling: code completion
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
source tooling
Area: IDE support, SourceKit, and other source tooling
type checker
Area → compiler: Semantic analysis
Environment
I was working on a project and received this bug message while trying to compile the file.
Additional Detail from JIRA
md5: 5c2bf1b01490da1eca82ab49c5eb3287
Issue Description:
I was working on a project and received this bug message while trying to compile the file.
"Failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project."
//
// ContentView.swift
// M29A2
//
// Created by Andy Klien on 2022-01-23.
//
import SwiftUI
struct ContentView: View {
{ Text(userText.uppercased()) .font(.largeTitle) }
else if capMode == 2
{ Text(userText.capitalized()) .font(.largeTitle) }
else if capMode == 3
{ Text(userText.lowercased()) .font(.largeTitle) }
{ capMode = 1 }
) {
{ capMode = 2 }
) {
{ capMode = 3 }
)
{ RoundedButton(title: "Lowercase", colour: .red) }
{ Text(title) .padding(10) .frame(maxWidth:.infinity) .background(colour) .font(.body) .cornerRadius(10) .foregroundColor(.white) }
{ ContentView() }
}
The text was updated successfully, but these errors were encountered: