summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-09-22 21:06:29 +0000
committerPaul Phillips <paulp@improving.org>2010-09-22 21:06:29 +0000
commit0a0cdb03d8c4c9c42da114fe5b0bc8c7911f0c24 (patch)
tree0453f1f366f9c62a014570f92758622bcb7d8292
parent1b1d48353bc07aa3885678c7c74c656e69010448 (diff)
downloadscala-0a0cdb03d8c4c9c42da114fe5b0bc8c7911f0c24.tar.gz
scala-0a0cdb03d8c4c9c42da114fe5b0bc8c7911f0c24.tar.bz2
scala-0a0cdb03d8c4c9c42da114fe5b0bc8c7911f0c24.zip
Test case closes #3774, no review.
-rw-r--r--test/files/neg/bug3774.check7
-rw-r--r--test/files/neg/bug3774.scala3
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/bug3774.check b/test/files/neg/bug3774.check
new file mode 100644
index 0000000000..f969218770
--- /dev/null
+++ b/test/files/neg/bug3774.check
@@ -0,0 +1,7 @@
+bug3774.scala:2: error: overloaded method value ++ with alternatives:
+ [B1 >: List[Int]](xs: scala.collection.TraversableOnce[((Int, Int), B1)])scala.collection.immutable.Map[(Int, Int),B1] <and>
+ [B >: ((Int, Int), List[Int]),That](that: scala.collection.TraversableOnce[B])(implicit bf: scala.collection.generic.CanBuildFrom[scala.collection.immutable.Map[(Int, Int),List[Int]],B,That])That
+ cannot be applied to (scala.collection.immutable.IndexedSeq[((Int, Int), scala.collection.immutable.Range.Inclusive)])
+ Map[(Int,Int),List[Int]]() ++ (for(x <- 0 to 1 ; y <- 0 to 1) yield {(x,y)-> (0 to 1)})
+ ^
+one error found
diff --git a/test/files/neg/bug3774.scala b/test/files/neg/bug3774.scala
new file mode 100644
index 0000000000..2fb9bf5d39
--- /dev/null
+++ b/test/files/neg/bug3774.scala
@@ -0,0 +1,3 @@
+object Hang {
+ Map[(Int,Int),List[Int]]() ++ (for(x <- 0 to 1 ; y <- 0 to 1) yield {(x,y)-> (0 to 1)})
+} \ No newline at end of file