Question: I have two classes:

```
class Base[A]{
    def doSome:A
}

class StringImpl extends Base[String]

```

How can I infer (without manifest, only reflection analysys) that generic type A inside class StringImpl is a String? (In real case Iheritance structure may be mach more complex that example)

Answer: 
Using scala runtime reflection (`isInstanceOf` doesn't work for erased types - it always returns `true`):

```
typeOf[StringImpl] <:< typeOf[Base[String]] //true 
typeOf[StringImpl] <:< typeOf[Base[Int]] //false

```

See: <http://www.scala-lang.org/api/2.11.7/scala-reflect/#scala.reflect.api.Types>$TypeApi

```
val tp = typeOf[StringImpl]
tp.baseType(tp.baseClasses(1)).typeArgs
res17_4: List[reflect.runtime.package.universe.Type] = List(String)

```

It allows you to access type-parameters etc for a more complicated case.

Update. for `ClassSymbol` you can use `typeSignature` method:

```
tp.typeSymbol.typeSignature

res19_5: reflect.runtime.package.universe.Type = Helper.this.Base[String] {
  def <init>(): Helper.this.StringImpl
  def doSome: String
}

```

Also, for macro (if you don't want obvious `WeakTypeTag` solution):

```
 import c.universe._
 val TypeApply(_, List(typeTree)) = c.macroApplication
 //you can analyze typeTree here

```

[Scala: Get type name without runtime reflection and without type instance](https://stackoverflow.com/questions/15649720/scala-get-type-name-without-runtime-reflection-and-without-type-instance)

---

General answer

Generic types are erased in JVM, so no info is stored by default in runtime - it "physically" impossible to get erased type in runtime without ClassTag/TypeTag in general case (you can only explore method/member signatures in subclass if such exist). However, you can always do compile-time check, something like:

```
abstract class Base{
   type A
   def doSome:A
}

class StringImpl extends Base{
   type A = String
   def doSome:A = "aaa"

}

implicitly[StringImpl#A =:= String]

```
I think you can get `doSome` method **return type** for the generic type **A** without **Manifest**(for doesn't have access to the **parent** class), like:

```
new StringImpl().getClass.getMethod("doSome").getReturnType.getSimpleName
> String

```