diff options
author | Martin Odersky <odersky@gmail.com> | 2011-01-18 17:40:52 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2011-01-18 17:40:52 +0000 |
commit | cace663c9511515d8bc61326e13147fb0f188a42 (patch) | |
tree | 87844f61c6c115465e284d6085e1d1b713b4c6f1 /src | |
parent | b9f20bf6d5e3611fafba0d0b5835dca81f80b10a (diff) | |
download | scala-cace663c9511515d8bc61326e13147fb0f188a42.tar.gz scala-cace663c9511515d8bc61326e13147fb0f188a42.tar.bz2 scala-cace663c9511515d8bc61326e13147fb0f188a42.zip |
Reverted to curried invokeDynamic to fix a prob...
Reverted to curried invokeDynamic to fix a problem in typers.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 14 | ||||
-rw-r--r-- | src/library/scala/Dynamic.scala | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 586740bce3..3337584420 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3471,14 +3471,14 @@ trait Typers extends Modes { // try to expand according to Dynamic rules. if (qual.tpe.widen.typeSymbol isNonBottomSubClass DynamicClass) { - val otherArgs = context.tree match { - case Apply(tree1, args) if tree1 eq tree => args - case _ => List() - } - var dynSelect = atPos(tree.pos) { - Apply(Select(qual, nme.invokeDynamic), Literal(Constant(name.toString)) :: otherArgs) + var dynInvoke = Apply(Select(qual, nme.invokeDynamic), List(Literal(Constant(name.toString)))) + context.tree match { + case Apply(tree1, args) if tree1 eq tree => + ; + case _ => + dynInvoke = Apply(dynInvoke, List()) } - return typed1(util.trace("dynatype: ")(dynSelect), mode, pt) + return typed1(util.trace("dynatype: ")(dynInvoke), mode, pt) } if (settings.debug.value) { diff --git a/src/library/scala/Dynamic.scala b/src/library/scala/Dynamic.scala index 2d8dbc9977..2a1cabb51c 100644 --- a/src/library/scala/Dynamic.scala +++ b/src/library/scala/Dynamic.scala @@ -11,7 +11,7 @@ trait Dynamic { * @param name The name of the invoked method * @param args The arguments to the method */ - def invokeDynamic(name: String, args: Any*): Any + def invokeDynamic(name: String)(args: Any*): Any /** Returns the underlying value typed as an instance of type T * @param T The target type |