diff options
Diffstat (limited to 'test/files/pos/sammy_implicit.scala')
-rw-r--r-- | test/files/pos/sammy_implicit.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/sammy_implicit.scala b/test/files/pos/sammy_implicit.scala new file mode 100644 index 0000000000..c9c2519bab --- /dev/null +++ b/test/files/pos/sammy_implicit.scala @@ -0,0 +1,10 @@ +abstract class SamImplicitConvert { + trait Fun[A, B] { def apply(a: A): B } + class Lst[T] + abstract class Str { def getBytes: Array[Int] } + def flatMap[B](f: Fun[Str, Lst[B]]): List[B] = ??? + + implicit def conv(xs: Array[Int]): Lst[Int] + + val encoded = flatMap (_.getBytes) +} |