diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala index fcee9c4d0e..2848469215 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala @@ -140,7 +140,9 @@ abstract class TreeBuilder { /** Create tree representing an object creation <new parents { stats }> */ def makeNew(parents: List[Tree], self: ValDef, stats: List[Tree], argss: List[List[Tree]]): Tree = - if (parents.tail.isEmpty && stats.isEmpty) + if (parents.isEmpty) + makeNew(List(scalaAnyRefConstr), self, stats, argss) + else if (parents.tail.isEmpty && stats.isEmpty) New(parents.head, argss) else { val x = nme.ANON_CLASS_NAME.toTypeName |