aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/sammy_poly.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2015-02-07 18:03:01 +0100
committerodersky <odersky@gmail.com>2015-02-07 18:03:01 +0100
commit9641b2a417f203b5c2e88e6330b2230713471307 (patch)
tree7509a675738c13a428d2ecb5a371d242213a4849 /tests/pos/sammy_poly.scala
parent329b6bfa9929c984b40368a1cc5f2f8cdc15b6c8 (diff)
parent976ed6fd0aa4f0dd3da54889c4d85ef856f6531f (diff)
downloaddotty-9641b2a417f203b5c2e88e6330b2230713471307.tar.gz
dotty-9641b2a417f203b5c2e88e6330b2230713471307.tar.bz2
dotty-9641b2a417f203b5c2e88e6330b2230713471307.zip
Merge pull request #339 from dotty-staging/fix/#329-and-others
Fix/#329 and others
Diffstat (limited to 'tests/pos/sammy_poly.scala')
-rw-r--r--tests/pos/sammy_poly.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pos/sammy_poly.scala b/tests/pos/sammy_poly.scala
new file mode 100644
index 000000000..f43fa292c
--- /dev/null
+++ b/tests/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))
+}