diff options
author | Aleksandar Prokopec <axel22@gmail.com> | 2012-10-03 18:06:39 +0200 |
---|---|---|
committer | Aleksandar Prokopec <axel22@gmail.com> | 2012-10-04 11:32:27 +0200 |
commit | b405a2969477f9e9a76274eac1ebda3c0f2942ad (patch) | |
tree | 067747051a075740b041b665271032cfb31eb577 /test | |
parent | 3ffc62b49914c6bf466f0f5e10c8f34b2cff5899 (diff) | |
download | scala-b405a2969477f9e9a76274eac1ebda3c0f2942ad.tar.gz scala-b405a2969477f9e9a76274eac1ebda3c0f2942ad.tar.bz2 scala-b405a2969477f9e9a76274eac1ebda3c0f2942ad.zip |
SI-6467: Zero element in aggregate now by-name
Diffstat (limited to 'test')
-rw-r--r-- | test/files/presentation/ide-bug-1000531.check | 2 | ||||
-rw-r--r-- | test/files/run/t6467.scala | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/test/files/presentation/ide-bug-1000531.check b/test/files/presentation/ide-bug-1000531.check index 4be98a6b21..6c3892d272 100644 --- a/test/files/presentation/ide-bug-1000531.check +++ b/test/files/presentation/ide-bug-1000531.check @@ -19,7 +19,7 @@ retrieved 126 members [accessible: true] `method addString(b: StringBuilder)StringBuilder` [accessible: true] `method addString(b: StringBuilder, sep: String)StringBuilder` [accessible: true] `method addString(b: StringBuilder, start: String, sep: String, end: String)StringBuilder` -[accessible: true] `method aggregate[B](z: B)(seqop: (B, B) => B, combop: (B, B) => B)B` +[accessible: true] `method aggregate[B](z: => B)(seqop: (B, B) => B, combop: (B, B) => B)B` [accessible: true] `method asInstanceOf[T0]=> T0` [accessible: true] `method buffered=> scala.collection.BufferedIterator[B]` [accessible: true] `method collectFirst[B](pf: PartialFunction[B,B])Option[B]` diff --git a/test/files/run/t6467.scala b/test/files/run/t6467.scala new file mode 100644 index 0000000000..dc93b69fdc --- /dev/null +++ b/test/files/run/t6467.scala @@ -0,0 +1,20 @@ + + + + +import collection._ + + + +object Test extends App { + + def compare(s1: String, s2: String) { + assert(s1 == s2, s1 + "\nvs.\n" + s2) + } + + compare(List(1, 2, 3, 4).aggregate(new java.lang.StringBuffer)(_ append _, _ append _).toString, "1234") + compare(List(1, 2, 3, 4).par.aggregate(new java.lang.StringBuffer)(_ append _, _ append _).toString, "1234") + compare(Seq(0 until 100: _*).aggregate(new java.lang.StringBuffer)(_ append _, _ append _).toString, (0 until 100).mkString) + compare(Seq(0 until 100: _*).par.aggregate(new java.lang.StringBuffer)(_ append _, _ append _).toString, (0 until 100).mkString) + +}
\ No newline at end of file |