1
2
3
4
5
6
7
8
9
10
11
scala> class Polymorphic {
     |   def polyMethod[T](implicit om: Manifest[T]) = {
     |     println(om.erasure.getName)
     |     om.erasure.newInstance
     |   }
     | }
defined class Polymorphic

scala> val x = (new Polymorphic).polyMethod[String]
java.lang.String
x: Any = ""