Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wire: wire.FieldsOf should not provide pointer to field type for non-pointer structs #210

Merged
merged 5 commits into from Sep 5, 2019

Conversation

vangent
Copy link
Contributor

@vangent vangent commented Sep 4, 2019

@zombiezen pointed out (hah!) that FieldsOf should not provide a pointer to field types in cases where the struct itself is not a pointer; the struct is then a temporary variable.

I moved the previously-working "pointer to field type" test from FieldsOfStruct to FieldsOfStructPointer, and added a new non-working testcase attempting to provide a ptr-to-field from a non-pointer struct (expected to fail).

Fixes #208.

@vangent vangent requested a review from shantuo September 4, 2019 17:23
@googlebot googlebot added the cla: yes Google CLA has been signed! label Sep 4, 2019
wire.go Outdated Show resolved Hide resolved
@vangent vangent merged commit c385f07 into google:master Sep 5, 2019
@vangent vangent deleted the fieldsof branch September 5, 2019 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA has been signed!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow FieldsOf to provide a pointer type
3 participants