diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/reflect/Code.scala | 3 | ||||
-rw-r--r-- | src/library/scala/reflect/Print.scala | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/library/scala/reflect/Code.scala b/src/library/scala/reflect/Code.scala index 6632643160..83aa81d03d 100644 --- a/src/library/scala/reflect/Code.scala +++ b/src/library/scala/reflect/Code.scala @@ -19,4 +19,5 @@ case class Apply(fun: Code, args: List[Code]) extends Code; case class TypeApply(fun: Code, args: List[Type]) extends Code; case class Function(params: List[Symbol], body: Code) extends Code; case class This(sym: Symbol) extends Code; -case class Block(stats: List[Code], expr: Code) extends Code;
\ No newline at end of file +case class Block(stats: List[Code], expr: Code) extends Code; +case class New(sym: Code) extends Code;
\ No newline at end of file diff --git a/src/library/scala/reflect/Print.scala b/src/library/scala/reflect/Print.scala index e6995bc167..5d4cf45f62 100644 --- a/src/library/scala/reflect/Print.scala +++ b/src/library/scala/reflect/Print.scala @@ -36,6 +36,7 @@ object Print extends Function1[Any, String] { case reflect.Function(params, body) => "(" + params.map(Print).mkString("(", ", ", ")") + " => " + Print(body) + ")" case reflect.This(sym) => "(" + Print(sym) + ".this)" case reflect.Block(stats, expr) => (stats ::: List(expr)).map(Print).mkString("{", ";\n", "}") + case reflect.New(clazz) => "(new " + Print(clazz) + ")" case _ => "???" } |