Skip to content

Conversation

dsnet
Copy link
Collaborator

@dsnet dsnet commented Apr 23, 2022

When printing a pointer, only elide the type for unnamed pointers.
Otherwise, we can run into situations where named and unnamed pointers
format the same way in indistinguishable ways.

When printing an interface, never explicitly skip printing the type.
Whether we skip printing the type should be determined by the
parent container type, and not locally determined.
For example, interface values within a struct, slice, or map
will always be elided since they can be inferred.

Fixes #291

When printing a pointer, only elide the type for unnamed pointers.
Otherwise, we can run into situations where named and unnamed pointers
format the same way in indistinguishable ways.

When printing an interview, never skip the interface type.
Whether we skip printing the type should be determined by the
parent containers, and not locally determined.
For examples, interface values within a struct, slice, or map
will always be elided since they can be inferred.
@dsnet dsnet requested a review from neild April 23, 2022 19:30
@dsnet dsnet merged commit 4664e24 into master Apr 25, 2022
@dsnet dsnet deleted the dsnet/reporter-bug branch April 25, 2022 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Poor reporter output for concrete type versus interface type difference

2 participants