mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-05-07 20:12:28 +00:00
23 lines
653 B
Swift
23 lines
653 B
Swift
import Foundation
|
|
|
|
package extension Mirror {
|
|
var debugDescription: String {
|
|
var data: [String] = []
|
|
if let superclassMirror = superclassMirror {
|
|
for child in superclassMirror.children {
|
|
guard let label = child.label else {
|
|
continue
|
|
}
|
|
data.append("\(label): \(child.value)")
|
|
}
|
|
}
|
|
for child in children {
|
|
guard let label = child.label else {
|
|
continue
|
|
}
|
|
data.append("\(label): \(child.value)")
|
|
}
|
|
return "\(subjectType){\(data.joined(separator: ","))}"
|
|
}
|
|
}
|