We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de27ae6 commit e21e0b4Copy full SHA for e21e0b4
Sources/SwiftDiagnostics/Diagnostic.swift
@@ -74,12 +74,12 @@ public struct Diagnostic: CustomDebugStringConvertible {
74
75
public struct DiagnosticsError: Error {
76
public var diagnostics: [Diagnostic]
77
-
+
78
/// The diagnostics must contain at least one with severity == `.error`.
79
/// Asserts if this condition is not satisfied.
80
public init(diagnostics: [Diagnostic]) {
81
self.diagnostics = diagnostics
82
83
assert(
84
diagnostics.contains(where: { $0.diagMessage.severity == .error }),
85
"at least one diagnostic must have severity == .error"
0 commit comments