blob: 3291493c52da57075c333c08a6c786d586fdddff (
plain) (
tree)
|
|
// test synthesizeSAMFunction where the sam type is not fully defined
trait F1[T, U] { def apply(x: T): U }
class T {
import T._
// NOTE: the f(x) desugaring for now assumes the single abstract method is called 'apply'
def app1[T, U](x: T)(f: F1[T, U]): U = f(x)
def app2[T, U](x: T)(f: F2[T, U]): U = f(x)
app1(1)(x => List(x))
app2(1)(x => List(x))
}
object T{
trait F2[T, U] { def apply(x: T): U }
}
|