blob: f9f5c853b7e882a6baf130fc8cab0a3624af1431 (
plain) (
tree)
|
|
object Test extends dotty.runtime.LegacyApp {
val f = () => 5
def test(g: => Int): Unit = {
val gFunc = g _
val isSameClosureClass = gFunc.getClass == f.getClass
val isSame = gFunc eq f
println("Is same closure class: "+isSameClosureClass+" is same closure: "+isSame)
}
test(f())
}
|