diff options
author | Martin Odersky <odersky@gmail.com> | 2010-06-06 07:36:23 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-06-06 07:36:23 +0000 |
commit | 407ba61ff62de06cfa3c5f72b66f0ea4be793880 (patch) | |
tree | 7eca44f173d63aaf6a28e438fbabadea39be258c | |
parent | 5440040432585e9f5d5daaa3a04c2004d25da725 (diff) | |
download | scala-407ba61ff62de06cfa3c5f72b66f0ea4be793880.tar.gz scala-407ba61ff62de06cfa3c5f72b66f0ea4be793880.tar.bz2 scala-407ba61ff62de06cfa3c5f72b66f0ea4be793880.zip |
Solved problem that -3.0 is not recognized as a...
Solved problem that -3.0 is not recognized as a constant in annotations
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala b/src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala index ac1853cbe0..5e11cf7bb6 100644 --- a/src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala +++ b/src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala @@ -33,7 +33,7 @@ abstract class ConstantFolder { * @param tree ... * @param pt ... */ - def apply(tree: Tree, pt: Type): Tree = fold(tree, tree.tpe match { + def apply(tree: Tree, pt: Type): Tree = fold(apply(tree), tree.tpe match { case ConstantType(x) => x convertTo pt case _ => null }) |