summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-05-21 13:23:45 +0000
committerMartin Odersky <odersky@gmail.com>2008-05-21 13:23:45 +0000
commit0425a6b3f7f5122024e2adbb8f595ce662acc574 (patch)
tree92bfa412c5a82831b40f812f2aa2dbc11eb0401b
parenteea19e9670b45a3bebfbb1ffa742172f6320b95f (diff)
downloadscala-0425a6b3f7f5122024e2adbb8f595ce662acc574.tar.gz
scala-0425a6b3f7f5122024e2adbb8f595ce662acc574.tar.bz2
scala-0425a6b3f7f5122024e2adbb8f595ce662acc574.zip
fixed #665
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala3
-rw-r--r--test/files/pos/t0674.scala113
2 files changed, 115 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index bce45e4b42..eb12867ea9 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -810,7 +810,8 @@ trait Typers { self: Analyzer =>
}
if (coercion != EmptyTree) {
if (settings.debug.value) log("inferred view from "+tree.tpe+" to "+pt+" = "+coercion+":"+coercion.tpe)
- return typed(Apply(coercion, List(tree)) setPos tree.pos, mode, pt)
+ return newTyper(context.makeImplicit(context.reportAmbiguousErrors)).typed(
+ Apply(coercion, List(tree)) setPos tree.pos, mode, pt)
}
}
}
diff --git a/test/files/pos/t0674.scala b/test/files/pos/t0674.scala
index 9f7a78dda3..37ae1ce37c 100644
--- a/test/files/pos/t0674.scala
+++ b/test/files/pos/t0674.scala
@@ -18,5 +18,118 @@ for(a <- Some(1);
p <- Some(16);
q <- Some(17);
r <- Some(18);
+ s <- Some(19);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
+ b <- Some(2);
+ c <- Some(3);
+ d <- Some(4);
+ e <- Some(5);
+ f <- Some(6);
+ g <- Some(7);
+ h <- Some(8);
+ i <- Some(9);
+ j <- Some(10);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
+ s <- Some(19);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
+ b <- Some(2);
+ c <- Some(3);
+ d <- Some(4);
+ e <- Some(5);
+ f <- Some(6);
+ g <- Some(7);
+ h <- Some(8);
+ i <- Some(9);
+ j <- Some(10);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
+ s <- Some(19);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
+ b <- Some(2);
+ c <- Some(3);
+ d <- Some(4);
+ e <- Some(5);
+ f <- Some(6);
+ g <- Some(7);
+ h <- Some(8);
+ i <- Some(9);
+ j <- Some(10);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
+ s <- Some(19);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
+ b <- Some(2);
+ c <- Some(3);
+ d <- Some(4);
+ e <- Some(5);
+ f <- Some(6);
+ g <- Some(7);
+ h <- Some(8);
+ i <- Some(9);
+ j <- Some(10);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
+ s <- Some(19);
+ k <- Some(11);
+ l <- Some(12);
+ m <- Some(13);
+ n <- Some(14);
+ o <- Some(15);
+ p <- Some(16);
+ q <- Some(17);
+ r <- Some(18);
s <- Some(19)) yield a)
}