Skip to content

Prioritize custom printers over default aggregate printing.#1982

Closed
copybara-service[bot] wants to merge 0 commit intomainfrom
cl/868817106
Closed

Prioritize custom printers over default aggregate printing.#1982
copybara-service[bot] wants to merge 0 commit intomainfrom
cl/868817106

Conversation

@copybara-service
Copy link
Contributor

Prioritize custom printers over default aggregate printing.

This change makes AbslStringify and FuzzTestPrintSourceCode take precedence over the default field-level printing for aggregate types. If a custom printer is defined for a type, it will be used for both human-readable and source-code modes, with fallback between AbslStringify and FuzzTestPrintSourceCode. The documentation is updated to reflect this behavior.

This reduces the amount of boilerplate that the user has to write to override the default field-level printing: with the change, it suffices to define AbslStringify. This is important for aggregate types that have a nested C-style array, for which the aggregate detection yields a compile-time error.

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.

0 participants