From 6fc1fe1d66829d2dbde21adf5955ab6bf21d2bd8 Mon Sep 17 00:00:00 2001 From: Gilles Dubochet Date: Fri, 20 Jan 2006 15:16:02 +0000 Subject: Improved TypedCode to support yet more code. --- src/compiler/scala/tools/nsc/typechecker/Codification.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/compiler') 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" -- cgit v1.2.3