Skip to content

Poor reporter output for concrete type versus interface type difference #291

Closed
@dsnet

Description

Consider this example:

func addr[T any](v T) *T {
	return &v
}
fmt.Println(cmp.Diff(
	addr("hello"),
	addr(any("hello")),
))

This currently prints:

  any(
- 	&⟪0xc0000102f0⟫string("hello"),
+ 	&⟪0xc000010300⟫string("hello"),
  )

which is unhelpful for determining exactly what the difference is.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions