aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-08-08 17:38:59 +0200
committerMartin Odersky <odersky@gmail.com>2013-08-08 17:38:59 +0200
commit7f8ce8379296a399d29fdf9ec91210f44460f98f (patch)
tree3957107d3c81e28a382ef898d34297d1be0b1131 /src/dotty/tools/dotc/ast
parentdb9f555e2f02ac345945cb3982b0bf872f44a880 (diff)
downloaddotty-7f8ce8379296a399d29fdf9ec91210f44460f98f.tar.gz
dotty-7f8ce8379296a399d29fdf9ec91210f44460f98f.tar.bz2
dotty-7f8ce8379296a399d29fdf9ec91210f44460f98f.zip
Typing of return statements.
Diffstat (limited to 'src/dotty/tools/dotc/ast')
-rw-r--r--src/dotty/tools/dotc/ast/TypedTrees.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/ast/TypedTrees.scala b/src/dotty/tools/dotc/ast/TypedTrees.scala
index cce2f6ab6..4f0f80255 100644
--- a/src/dotty/tools/dotc/ast/TypedTrees.scala
+++ b/src/dotty/tools/dotc/ast/TypedTrees.scala
@@ -68,6 +68,9 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
def Literal(const: Constant)(implicit ctx: Context): Literal =
untpd.Literal(const).withType(const.tpe).checked
+ def unitLiteral(implicit ctx: Context): Literal =
+ Literal(Constant(()))
+
def New(tpt: Tree)(implicit ctx: Context): New =
untpd.New(tpt).withType(tpt.tpe).checked