diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-23 13:38:55 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-23 13:38:55 +0200 |
commit | c01389d170bb0f1c8a925a25c145396007a75106 (patch) | |
tree | 40d0117154755585d1208ef28c67d11bffe6b238 /tests/neg | |
parent | e3449e9fdbb3801eb07680e4938bc4c3c77ec3a8 (diff) | |
download | dotty-c01389d170bb0f1c8a925a25c145396007a75106.tar.gz dotty-c01389d170bb0f1c8a925a25c145396007a75106.tar.bz2 dotty-c01389d170bb0f1c8a925a25c145396007a75106.zip |
Fix #492. Traits that require an outer pointer are not SAMs.
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)) +} |