diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2010-04-09 15:42:34 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2010-04-09 15:42:34 +0000 |
commit | 710e1cb6c4029f39bdd1eece975dbb3cdfafdeda (patch) | |
tree | 9d2fd741d17d2410b571f72bed5d7e5525ad5440 /src/library/scala/Tuple2.scala | |
parent | d76943f9ae43176980f21f90f400053fe2da3fbf (diff) | |
download | scala-710e1cb6c4029f39bdd1eece975dbb3cdfafdeda.tar.gz scala-710e1cb6c4029f39bdd1eece975dbb3cdfafdeda.tar.bz2 scala-710e1cb6c4029f39bdd1eece975dbb3cdfafdeda.zip |
Changed the syntax of the specialized annotation:
instead of a flaky string, it now takes a
repeated parameter list of primitive types:
@specialized("Int, Double") becomes @specialized(Int, Double). No
review.
Diffstat (limited to 'src/library/scala/Tuple2.scala')
-rw-r--r-- | src/library/scala/Tuple2.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library/scala/Tuple2.scala b/src/library/scala/Tuple2.scala index 8c4e5973c5..7fea22410d 100644 --- a/src/library/scala/Tuple2.scala +++ b/src/library/scala/Tuple2.scala @@ -19,7 +19,8 @@ import scala.collection.generic.CanBuildFrom /** Tuple2 is the canonical representation of a @see Product2 * */ -case class Tuple2[+T1, +T2](_1:T1,_2:T2) +case class Tuple2[@specialized(Int, Long, Double) +T1, + @specialized(Int, Long, Double) +T2](_1:T1,_2:T2) extends Product2[T1, T2] { override def toString() = "(" + _1 + "," + _2 + ")" |