diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2006-01-20 15:16:02 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2006-01-20 15:16:02 +0000 |
commit | 6fc1fe1d66829d2dbde21adf5955ab6bf21d2bd8 (patch) | |
tree | 1dfdc54d53c590c7fc05443fa8766d67312e2fd2 /src/compiler | |
parent | 628f5c1eab1f460e0ac1281b3e156e234ce5cb77 (diff) | |
download | scala-6fc1fe1d66829d2dbde21adf5955ab6bf21d2bd8.tar.gz scala-6fc1fe1d66829d2dbde21adf5955ab6bf21d2bd8.tar.bz2 scala-6fc1fe1d66829d2dbde21adf5955ab6bf21d2bd8.zip |
Improved TypedCode to support yet more code.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Codification.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Codification.scala b/src/compiler/scala/tools/nsc/typechecker/Codification.scala index 70a4876aee..9a79e2b3e8 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Codification.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Codification.scala @@ -48,6 +48,10 @@ mixin class Codification requires Analyzer { reflect.This(reify(tree.symbol)) case Block(stats, expr) => reflect.Block(stats.map(reify), reify(expr)) + case New(clazz) => + val reifiedClass = reify(clazz) + reflect.New(reifiedClass) + case Typed(t, _) => reify(t) case _ => throw new TypeError("cannot reify tree: " + tree) } @@ -127,6 +131,7 @@ mixin class Codification requires Analyzer { case reflect.LocalMethod(_, _, _) => "scala.reflect.LocalMethod" case reflect.This(_) => "scala.reflect.This" case reflect.Block(_,_) => "scala.reflect.Block" + case reflect.New(_) => "scala.reflect.New" case reflect.NamedType(_) => "scala.reflect.NamedType" case reflect.PrefixedType(_, _) => "scala.reflect.PrefixedType" case reflect.SingleType(_, _) => "scala.reflect.SingleType" |