diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-26 11:31:40 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-26 11:31:40 -0700 |
commit | b716261a7b29bcf613cb4e3b47ca2fb5a97380bb (patch) | |
tree | 898dd03c5108f114094f13cd50525857c158cb24 /src/library | |
parent | cf08f25d598a1d44ed4440b1cc1097a5869aefdd (diff) | |
download | scala-b716261a7b29bcf613cb4e3b47ca2fb5a97380bb.tar.gz scala-b716261a7b29bcf613cb4e3b47ca2fb5a97380bb.tar.bz2 scala-b716261a7b29bcf613cb4e3b47ca2fb5a97380bb.zip |
Avoid relying on auto-tupling.
When you call
Some(a, b, c)
The compiler does eventually figure out that you meant
Some((a, b, c))
However the compiler finds this inordinately taxing, and
because this auto-tupling is dangerous, -Xlint warns about it.
In the interests of being able to hear -Xlint's important
points, we write Some((a, b, c)) to give it less to warn about.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/SeqExtractors.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/collection/SeqExtractors.scala b/src/library/scala/collection/SeqExtractors.scala index de9ff93521..20ea7f54b7 100644 --- a/src/library/scala/collection/SeqExtractors.scala +++ b/src/library/scala/collection/SeqExtractors.scala @@ -11,7 +11,7 @@ object +: { /** An extractor used to init/last deconstruct sequences. */ object :+ { /** Splits a sequence into init :+ tail. - * @return Some(init, tail) if sequence is non-empty. None otherwise. + * @return Some((init, tail)) if sequence is non-empty. None otherwise. */ def unapply[T,Coll <: SeqLike[T, Coll]]( t: Coll with SeqLike[T, Coll]): Option[(Coll, T)] = |