Skip to content

Commit 639db65

Browse files
committed
[PlaygroundLogger] When unwrapping optionals, don't propagate the type name.
Since the point is to log it as if it weren't an optional, we shouldn't propagate the type name (which references the fact that it's an optional).
1 parent db774c6 commit 639db65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PlaygroundLogger/PlaygroundLogger/LogEntry+Reflection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extension LogEntry {
7777

7878
if mirror.displayStyle == .optional && mirror.children.count == 1 {
7979
// If the mirror displays as an Optional and has exactly one child, then we want to unwrap the optionality and generate a log entry for the child.
80-
self = try .init(describing: mirror.children.first!.value, name: name, typeName: typeName, summary: nil, policy: policy, currentDepth: currentDepth)
80+
self = try .init(describing: mirror.children.first!.value, name: name, typeName: nil, summary: nil, policy: policy, currentDepth: currentDepth)
8181
}
8282
else {
8383
// Otherwise, we want to generate a log entry with the structure from the mirror.

0 commit comments

Comments
 (0)