blob: 75ee36f65461c3a82dd0e85e42a816858c9783f9 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
// test synthesizeSAMFunction where the sam type is not fully defined
class T {
trait F[T, U] { def apply(x: T): U }
// type F[T, U] = T => U
// NOTE: the f(x) desugaring for now assumes the single abstract method is called 'apply'
def app[T, U](x: T)(f: F[T, U]): U = f(x)
app(1)(x => List(x))
}
|