1 2 3 4 5 6 7 8
object Test extends Application { class Truc { def getMachin() = "machin" def getMachinAsTruc() = this } val file = new Truc val parent: Truc = file.getMachin }