Skip to content

Conversation

@natecook1000
Copy link
Member

This function walks all the fields of a struct, class, or tuple, and calls body with the name, offset, and type of each field. body can perform any required work or validation, returning true to continue walking fields or false to stop immediately.

This function walks all the fields of a struct, class, or tuple, and calls
`body` with the name, offset, and type of each field. `body` can perform
any required work or validation, returning `true` to continue walking fields
or `false` to stop immediately.
@natecook1000 natecook1000 requested a review from lorentey July 14, 2020 15:48
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

Copy link
Member

@lorentey lorentey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍!

@natecook1000 natecook1000 merged commit 3af1deb into swiftlang:master Jul 14, 2020
@natecook1000 natecook1000 deleted the nate/add_foreachfield branch July 14, 2020 21:31
@compnerd
Copy link
Member

@natecook1000 this seems to have caused a regression on the windows bots:
https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019/2064/consoleText

Could you please take a look?

@compnerd
Copy link
Member

I was able to reproduce this locally, turned out to be a missing null-termination of a string. I've put up #32898 to address that.

@natecook1000
Copy link
Member Author

Nice catch!

lorentey pushed a commit to lorentey/swift that referenced this pull request Jul 17, 2020
This function walks all the fields of a struct, class, or tuple, and calls
`body` with the name, offset, and type of each field. `body` can perform
any required work or validation, returning `true` to continue walking fields
or `false` to stop immediately.

(cherry picked from commit 3af1deb)
lorentey added a commit that referenced this pull request Jul 27, 2020
…-sound-of-reflection

[5.3][stdlib] Add _forEachField(of:options:body:) function (#32873)
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.

3 participants