You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure the identifier of a "seen" object is only removed if the object's children were recursively reflected (#787)
This fixes a crash which can occur if an object has certain cyclic
references and it's included in an expectation expression which fails.
The bug is that the identifier of a "seen" object passed to
`Expression.Value.init(_reflecting:label:seenObjects:)` should only be
removed from the tracking dictionary if the object's children were
recursively reflected. If recursion did not occur, that indicates that
the object has been seen so it should be left in the tracking dictionary
to prevent subsequent recursion. I added new unit tests to validate
this.
Fixes#785
### Result:
The scenarios described in #785 no longer crash.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
0 commit comments