/**
  * If the extends clause of a trait declaration, an object declaration, or an object expression is
  * empty, then replace the empty extends clause with {Object}.
  */
 private List<TraitTypeWhere> rewriteExtendsClause(
     Node whence, List<TraitTypeWhere> extendsClause) {
   if (extendsClause.size() > 0) return extendsClause;
   if (!(whence instanceof ASTNode)) bug(whence, "Only ASTNodes are supported.");
   Id objectId =
       NodeFactory.makeId(NodeUtil.getSpan((ASTNode) whence), WellKnownNames.objectTypeName);
   TraitType typeObject = NodeFactory.makeTraitType(objectId);
   TraitTypeWhere extendsObject = NodeFactory.makeTraitTypeWhere(typeObject);
   return Collections.singletonList(extendsObject);
 }