apple / swift-xcode-playground-support

Logging and communication to allow Swift toolchains to communicate with Xcode.
Apache License 2.0
279 stars 64 forks source link

[PlaygroundLogger] Use `prefix` and `suffix` when getting the first and last n children for structured log entries. #26

Closed cwakamo closed 6 years ago

cwakamo commented 6 years ago

Offsetting indices only works for collections which implement BidirectionalCollection, while suffix(_:) is available for all collections. This prevent crashes when e.g. generating a LogEntry for instances of Set.

This addresses rdar://problem/39791397.

cwakamo commented 6 years ago

@swift-ci Please test