Skip to content

Conversation

@jspc
Copy link
Member

@jspc jspc commented Jun 13, 2023

The initialiser we generate is largely only useful for nil values; specifically when we're building unmarshallers.

It just so happens that it also works for marshalling builtin/ native types.

For complex types, the method of passing a value to new() wont work; that isn't what new() does.

Instead, though, because our mint.MarshallerUnmarshallerValuer expects a pointer receiver anyway, we can sub-out intialiser functions for an ampersand.

The initialiser we generate is largely only useful for nil values;
specifically when we're building unmarshallers.

It just so happens that it also works for marshalling builtin/ native types.

For complex types, the method of passing a value to `new()` wont work; that
isn't what `new()` does.

Instead, though, because our `mint.MarshallerUnmarshallerValuer` expects a pointer
receiver anyway, we can sub-out intialiser functions for an ampersand.
@github-actions
Copy link

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@jspc jspc merged commit e1d5282 into main Jun 13, 2023
@jspc jspc deleted the complex_marshall_support branch June 13, 2023 10:51
@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants