pointfreeco / swift-snapshot-testing

📸 Delightful Swift snapshot testing.
https://www.pointfree.co/episodes/ep41-a-tour-of-snapshot-testing
MIT License
3.72k stars 565 forks source link

Avoid additional trailing closure offset crash #786

Closed stephencelis closed 10 months ago

stephencelis commented 10 months ago

A MacroTesting bug report encountered an index crash:

https://github.com/pointfreeco/swift-macro-testing/issues/6

Even when updating to index(_:offsetBy:limitedBy:), the crash remained, so I've resorted to more explicit limiting math. This seems to fix the crash.