summaryrefslogtreecommitdiff
path: root/test/files/pos/sammy_implicit.scala
blob: ab63fc729e54bfaf5fe414c25af37ca6498b71b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
trait Fun[A, B] { def apply(a: A): B }

abstract class SamImplicitConvert {
  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]

  def encoded = flatMap (_.getBytes)
}