aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t1247.scala
blob: f9f5c853b7e882a6baf130fc8cab0a3624af1431 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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())
}