package pkg

object Test {
  def main(args: Array[String]): Unit = {
    val world = Hello("World")
    println(s"Hello ${world.name}")
  }
}

case class Hello(name: String)

package pkg

object Test {
  def main(args: Array[String]): Unit = {
    val world = Hello("World")
    println(s"Hello $world")
  }
}

case class Hello(name: String)

--- 
+++ 
@@ -3,7 +3,7 @@
 object Test {
   def main(args: Array[String]): Unit = {
     val world = Hello("World")
-    println(s"Hello $world")
+    println(s"Hello ${world.name}")
   }
 }
 
Print name of object instead of whole object
