diff options
author | Aleksandar Prokopec <axel22@gmail.com> | 2012-05-01 15:00:27 +0200 |
---|---|---|
committer | Aleksandar Prokopec <axel22@gmail.com> | 2012-05-01 15:00:27 +0200 |
commit | 5f29da78e954d93e5bc8b878565de8c2a2abe561 (patch) | |
tree | 0ef8d37ad1a12cc5d84ca635eff696f2500a0010 /test/files/neg/t3977.scala | |
parent | ce04a62391bdc879db0eca015a420711e1a07212 (diff) | |
download | scala-5f29da78e954d93e5bc8b878565de8c2a2abe561.tar.gz scala-5f29da78e954d93e5bc8b878565de8c2a2abe561.tar.bz2 scala-5f29da78e954d93e5bc8b878565de8c2a2abe561.zip |
Widen types in signatures of Future companion methods, refactor OnceCanBuildFrom.
Removed the implicit modifier on the OnceCanBuildFrom, as we don't
support implicit classes with zero arguments.
Added an implicit OnceCanBuildFrom method.
The idea behind OnceCanBuildFrom is for it to be used by methods which
construct collections, but are defined outside of collection classes.
OnceCanBuildFrom so far worked only for objects of type TraversableOnce:
shuffle(List(1, 2, 3).iterator: TraversableOnce[Int])
but this used to result in an implicit resolution error:
shuffle(List(1, 2, 3).iterator)
because after the type parameter M for `shuffle` was inferred to Iterator, no implicit
of type CanBuildFrom[Iterator[_], A, Iterator[A]] could be found.
Introduced another CanBuildFrom to the Iterator companion object.
Modified Future tests appropriately.
Diffstat (limited to 'test/files/neg/t3977.scala')
0 files changed, 0 insertions, 0 deletions