aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/simplesams.scala
blob: 14a7ba6c024f4434185045511df9c957f9eb335c (plain) (blame)
1
2
3
4
5
6
7
8
9
package test

trait X { def foo(x: Int): Int; def bar = foo(2) }
trait XX extends X

object test {
  val x: X = (x: Int) => 2  // should be a closure
  val xx: XX = (x: Int) => 2  // should be a closure, but blows up in backend
}