scala case class copy implementation
问题 I can't find how copy is implemented for case class in scala. Can I check it somehow? I though Intellij could point me to implementation, but it doesn't want to jump and I have no idea why :/ 回答1: You can inspect the scala case class output using scalac -print ClassName.scala , as the copy is actually a compiler generated method. Here's a given example: case class Test(s: String, i: Int) This is the output after filtering out noise for copy : case class Test extends Object with Product with