summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-11-27 14:14:45 +0000
committerMartin Odersky <odersky@gmail.com>2006-11-27 14:14:45 +0000
commit6538ff2bea57b2c14e4cb27a06e10c0dbe7081bb (patch)
treefddf9843369dc814085e6f2e9193c6f2e5744014 /src/compiler
parent2cd214e5fe5a6db7928400918c2482cbcd911e72 (diff)
downloadscala-6538ff2bea57b2c14e4cb27a06e10c0dbe7081bb.tar.gz
scala-6538ff2bea57b2c14e4cb27a06e10c0dbe7081bb.tar.bz2
scala-6538ff2bea57b2c14e4cb27a06e10c0dbe7081bb.zip
1. fixed bug834
2. changed implicit in Predef so that x+"abc" is now allowed for non-string x.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index 668730f36e..167b8be1c8 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -182,8 +182,14 @@ abstract class UnCurry extends InfoTransform with TypingTransformers {
Apply(Select(Ident(ex), "key"), List()),
Object_eq),
List(Ident(key))),
- Apply(Select(Ident(ex), "value"), List()),
- Throw(Ident(ex)));
+ Apply(
+ TypeApply(
+ Select(
+ Apply(Select(Ident(ex), "value"), List()),
+ Any_asInstanceOf),
+ List(TypeTree(meth.tpe.finalResultType))),
+ List()),
+ Throw(Ident(ex)))
val keyDef = ValDef(key, New(TypeTree(ObjectClass.tpe), List(List())))
val tryCatch = Try(body, List(CaseDef(pat, EmptyTree, rhs)), EmptyTree)
Block(List(keyDef), tryCatch)