Runtime Warning Finesse (#1023)

This commit is contained in:
Stephen Celis
2022-03-15 16:21:13 -04:00
committed by GitHub
parent 1efde6e57a
commit 2828dc44f6
7 changed files with 49 additions and 53 deletions

View File

@@ -110,7 +110,8 @@ func debugCaseOutput(_ value: Any) -> String {
}
}
return "\(type(of: value))\(debugCaseOutputHelp(value))"
return (value as? CustomDebugStringConvertible)?.debugDescription
?? "\(type(of: value))\(debugCaseOutputHelp(value))"
}
private func isUnlabeledArgument(_ label: String) -> Bool {