diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Codification.scala')
-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" |