summaryrefslogtreecommitdiff
path: root/test/files/pos/sammy_poly.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/sammy_poly.scala')
-rw-r--r--test/files/pos/sammy_poly.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/pos/sammy_poly.scala b/test/files/pos/sammy_poly.scala
new file mode 100644
index 0000000000..c629be7166
--- /dev/null
+++ b/test/files/pos/sammy_poly.scala
@@ -0,0 +1,7 @@
+// test synthesizeSAMFunction where the sam type is not fully defined
+class T {
+ trait F[T, U] { def apply(x: 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))
+} \ No newline at end of file