Skip to content

Failed to produce diagnostic for expression #82302

Open
@qashsolutions

Description

@qashsolutions

Description

var body: some View {
NavigationStack {
if viewModel.isLoading {
ProgressView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else {
Form {
supplementDetailsSection
scheduleSection
additionalInfoSection
statusSection
deleteSection
}
.navigationTitle(AppStrings.Actions.editSupplement)
.navigationBarTitleDisplayMode(.inline)
.navigationBarItems(
leading: Button(AppStrings.Common.cancel) {
dismiss()
},
trailing: Button(AppStrings.Common.save) {
saveChanges()
}
.disabled(!isFormValid || !hasChanges)
)
.alert(AppStrings.Common.error, isPresented: $showingError) {
Button(AppStrings.Common.ok) { }
} message: {
Text(viewModel.errorMessage ?? AppStrings.Common.error)
}
.alert(AppStrings.Common.confirmDelete, isPresented: $showingDeleteAlert) {
Button(AppStrings.Common.cancel, role: .cancel) { }
Button(AppStrings.Common.delete, role: .destructive) {
deleteSupplement()
}
} m

Reproduction


Expected behavior

unable to execute

Environment

swift 6

Additional information

swift 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions