summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2010-08-31 15:37:55 +0000
committerMartin Odersky <odersky@gmail.com>2010-08-31 15:37:55 +0000
commit2a6a1f370fa84aa2fbc9ad861dd2287622dfd653 (patch)
tree7d24d4c86ba72ff53032435e19d67de554051147 /test/files
parent8b0de323fd94264f2a9c0883e3127986baf8766b (diff)
downloadscala-2a6a1f370fa84aa2fbc9ad861dd2287622dfd653.tar.gz
scala-2a6a1f370fa84aa2fbc9ad861dd2287622dfd653.tar.bz2
scala-2a6a1f370fa84aa2fbc9ad861dd2287622dfd653.zip
Partial fix for #3774.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t3774.check7
-rw-r--r--test/files/neg/t3774.scala5
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/neg/t3774.check b/test/files/neg/t3774.check
new file mode 100644
index 0000000000..d73166bff9
--- /dev/null
+++ b/test/files/neg/t3774.check
@@ -0,0 +1,7 @@
+t3774.scala:4: 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/t3774.scala b/test/files/neg/t3774.scala
new file mode 100644
index 0000000000..2869925b01
--- /dev/null
+++ b/test/files/neg/t3774.scala
@@ -0,0 +1,5 @@
+// This used to hang the lub process. Now it rejects the file. This is still not correct,
+// but we can solve this only after a redesign of lub a la dot.
+object Hang {
+ Map[(Int,Int),List[Int]]() ++ (for(x <- 0 to 1 ; y <- 0 to 1) yield {(x,y)-> (0 to 1)})
+}