blob: 68a91a82ff7e8dcf74136387eed9c0d36e44f0b1 (
plain) (
tree)
|
|
class Foo[@specialized(Int) A](a:A) {
def bar[@specialized(Int) B](f:A => B) = new Foo(f(a))
}
object Test {
def main(args:Array[String]): Unit = {
val f = new Foo(333)
val ms = f.getClass().getDeclaredMethods().map(_.getName).sorted
ms.foreach(println)
}
}
|