diff options
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/sammy_poly.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/neg/sammy_poly.scala b/tests/neg/sammy_poly.scala new file mode 100644 index 000000000..8d0236496 --- /dev/null +++ b/tests/neg/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 } + // this is an inner trait, that will recieve an abstract $outer pointer. Not a SAM. + def app[T, U](x: T)(f: F[T, U]): U = f(x) + app(1)(x => List(x)) +} |