diff options
author | Rex Kerr <ichoran@gmail.com> | 2015-08-30 17:27:05 -0700 |
---|---|---|
committer | Rex Kerr <ichoran@gmail.com> | 2015-08-30 17:27:05 -0700 |
commit | 2c16790ae48debe6e8b07b7ece86b0c665359cfd (patch) | |
tree | 8c3ac3916aec0d33d3fca4f570dfd1f73d29bc57 /src/reflect | |
parent | 4f35ab77e6b4456025facc63297e7f2e93c2b9d0 (diff) | |
download | scala-2c16790ae48debe6e8b07b7ece86b0c665359cfd.tar.gz scala-2c16790ae48debe6e8b07b7ece86b0c665359cfd.tar.bz2 scala-2c16790ae48debe6e8b07b7ece86b0c665359cfd.zip |
SI-9379 Added toString to .zipped to allow Stream etc to short-circuit
Tuple2Zipped and Tuple3Zipped would try to compute a hash code when .toString was called on them. This overrides toString to print (collection1, collection2).zipped instead, using the collection's own toString method. This allows collections that have a toString but not a hashCode (such as Iterator.from(0) and s = 1 #:: s) to print out as they usually do.
JUnit test to verify the deferral to collections' .toString.
Diffstat (limited to 'src/reflect')
0 files changed, 0 insertions, 0 deletions