[swift-dev] [stdlib] Array.description calls debugDescription on its contents

Wojciech Czekalski wczekalski at me.com
Fri Dec 11 15:38:12 CST 2015


Hi,

while I was working on this <https://github.com/apple/swift/pull/348> PR I encountered unexpected behavior from Array.description. It iterates over its items and calls debugDescription on them. I found it a bit unexpected thus my question here. Is it desired behavior? I would expect description and debugDescription call respective methods on the contents.

(I asked the same question in the PR but thought it’s general, so might be worth posting here)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20151211/fb092221/attachment.html>


More information about the swift-dev mailing list