diff options
Diffstat (limited to 'src/library/scala/reflect/api/Trees.scala')
-rw-r--r-- | src/library/scala/reflect/api/Trees.scala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/library/scala/reflect/api/Trees.scala b/src/library/scala/reflect/api/Trees.scala index 2c960392ec..1472866460 100644 --- a/src/library/scala/reflect/api/Trees.scala +++ b/src/library/scala/reflect/api/Trees.scala @@ -486,11 +486,10 @@ trait Trees { self: Universe => * A `New(t, as)` is expanded to: `(new t).<init>(as)` */ def New(tpt: Tree, argss: List[List[Tree]]): Tree = { - assert(!argss.isEmpty) // todo. we need to expose names in scala.reflect.api -// val superRef: Tree = Select(New(tpt), nme.CONSTRUCTOR) val superRef: Tree = Select(New(tpt), nme.CONSTRUCTOR) - (superRef /: argss) (Apply) + if (argss.isEmpty) Apply(superRef, Nil) + else (superRef /: argss) (Apply) } /** Type annotation, eliminated by explicit outer */ |