From c01389d170bb0f1c8a925a25c145396007a75106 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 23 Apr 2015 13:38:55 +0200 Subject: Fix #492. Traits that require an outer pointer are not SAMs. --- tests/neg/sammy_poly.scala | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/neg/sammy_poly.scala (limited to 'tests/neg') 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)) +} -- cgit v1.2.3