diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2011-05-23 16:08:46 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2011-05-23 16:08:46 +0000 |
commit | 391d5573789c516e408b171b7a4415f3830c4f32 (patch) | |
tree | 5b39865536ec1aac5be3e99c3e3eded30685b645 /test | |
parent | 2f98eec2036047cca5d727db4e64215be161881b (diff) | |
download | scala-391d5573789c516e408b171b7a4415f3830c4f32.tar.gz scala-391d5573789c516e408b171b7a4415f3830c4f32.tar.bz2 scala-391d5573789c516e408b171b7a4415f3830c4f32.zip |
Merged revisions 24881,24956,24962,24966-24968,...
Merged revisions 24881,24956,24962,24966-24968,24991-24993 via svnmerge
from https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk
........
r24881 | odersky | 2011-05-03 16:44:33 +0200 (Tue, 03 May 2011) | 1 line
Closes #4537. No review.
........
r24956 | extempore | 2011-05-14 18:54:42 +0200 (Sat, 14 May 2011) | 1 line
Fix for view+groupBy closes #4558, no review.
........
r24962 | extempore | 2011-05-15 01:00:05 +0200 (Sun, 15 May 2011) | 7 lines
Fix for Iterator flattening regression. Not sure what happened, but
my theory is that ++ takes a by name argument, but doing a foldLeft
and using ++ to join creates a closure which loses the by-nameness. If
this theory is correct that's an ugly trap.
Not sure how I write a test against this sort of thing? Will take
pointers. For now, closes #4582, no review. ........ r24966 | odersky |
2011-05-16 14:51:54 +0200 (Mon, 16 May 2011) | 1 line
Removed ill-fated bridge method. Review by extempore. ........ r24967
| odersky | 2011-05-16 14:57:15 +0200 (Mon, 16 May 2011) | 1 line
Removing two more @bridge methods because they do not make sense
anymore. Review by extempore. ........ r24968 | odersky | 2011-05-16
16:37:10 +0200 (Mon, 16 May 2011) | 1 line
Closes 4560. Review by dragos.
........
r24991 | prokopec | 2011-05-19 16:04:13 +0200 (Thu, 19 May 2011) | 3 lines
Fixes and closes #4608.
No review.
........
r24992 | extempore | 2011-05-19 20:07:57 +0200 (Thu, 19 May 2011) | 2 lines
Specialized keySets for immutable and sorted maps are supposed to
be views, not actual sets. Closes #4616, no review. ........ r24993 |
extempore | 2011-05-19 20:08:15 +0200 (Thu, 19 May 2011) | 3 lines
Apparent assumption that Literal(0) would be adapted to Literal(0.0f)
as necessary mercilessly invalidated. Fixed mkZero to account for all
types explicitly. Closes #4617, no review. ........
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/bug4558.scala | 6 | ||||
-rw-r--r-- | test/files/run/bug4617.check | 1 | ||||
-rw-r--r-- | test/files/run/bug4617.scala | 15 | ||||
-rw-r--r-- | test/files/run/t4560.check | 1 | ||||
-rw-r--r-- | test/files/run/t4560.scala | 16 | ||||
-rw-r--r-- | test/files/run/t4608.scala | 11 |
6 files changed, 50 insertions, 0 deletions
diff --git a/test/files/run/bug4558.scala b/test/files/run/bug4558.scala new file mode 100644 index 0000000000..e7661421dc --- /dev/null +++ b/test/files/run/bug4558.scala @@ -0,0 +1,6 @@ +object Test { + def main(args: Array[String]): Unit = { + val xs = Seq(1,2,3).view.groupBy(identity) + assert(xs.size == 3) + } +} diff --git a/test/files/run/bug4617.check b/test/files/run/bug4617.check new file mode 100644 index 0000000000..6bbcce30eb --- /dev/null +++ b/test/files/run/bug4617.check @@ -0,0 +1 @@ +Str 8.0 diff --git a/test/files/run/bug4617.scala b/test/files/run/bug4617.scala new file mode 100644 index 0000000000..2fea5e29ec --- /dev/null +++ b/test/files/run/bug4617.scala @@ -0,0 +1,15 @@ +object Test { + def f1 = new { def f { lazy val d = 0d } } + def f2 = { + lazy val d = 4D + lazy val f = 4f + + def bar = "Str " + (d + f) + bar + } + + def main(args: Array[String]): Unit = { + f1 + println(f2) + } +} diff --git a/test/files/run/t4560.check b/test/files/run/t4560.check index 7ed6ff82de..fd3c81a4d7 100644 --- a/test/files/run/t4560.check +++ b/test/files/run/t4560.check @@ -1 +1,2 @@ 5 +5 diff --git a/test/files/run/t4560.scala b/test/files/run/t4560.scala index f1eb5d4169..f809e67898 100644 --- a/test/files/run/t4560.scala +++ b/test/files/run/t4560.scala @@ -16,8 +16,24 @@ trait B { } } +class A2 + +trait B2 { + self: A2 => + + def test { + import Pimper.pimp + + println(5.test) + } +} + object Test extends A with B { def main(args: Array[String]) { test + Test2.test } } + +object Test2 extends A2 with B2 + diff --git a/test/files/run/t4608.scala b/test/files/run/t4608.scala new file mode 100644 index 0000000000..a25d2fea05 --- /dev/null +++ b/test/files/run/t4608.scala @@ -0,0 +1,11 @@ + + + +// #4608 +object Test { + + def main(args: Array[String]) { + ((1 to 100) sliding 10).toList.par.map{_.map{i => i * i}}.flatten + } + +} |