object Main extends App { def f(x: { def x: Int; def y: String }) = { println(x.x) println(x.y) } f(new { val x = 1; val y = "fuck you" })}
Standard input is empty
1 fuck you
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!