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

support pointer receivers in HaveField; fixes #543 #544

Merged
merged 1 commit into from Apr 19, 2022

Conversation

thediveo
Copy link
Collaborator

No description provided.

@thediveo
Copy link
Collaborator Author

This might need some discussion? In case the receiver could not be found in the first lookup, I take the actual value's address and give it a second try.

@onsi
Copy link
Owner

onsi commented Apr 19, 2022

This looks good to me - I was surprised at first to learn that MethodByName doesn't behave the way compiled code does. But it's reflect package so ¯\_(ツ)_/¯

@onsi onsi merged commit 8dab36e into onsi:master Apr 19, 2022
@thediveo
Copy link
Collaborator Author

thediveo commented Apr 19, 2022

Things in the mirror ... they say, and that means reflect(ion). I stared for some time at my test code, wondering why HaveField should fail. Only after some time I thought, why, let's change the receiver type, even if that doesn't make much sense to me.

@thediveo thediveo deleted the havefield-ptr-receiver branch April 19, 2022 15:13
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.

None yet

2 participants