Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
scala> :power
scala> class A {
| object D {
| object E
| }
| }
defined class A
scala> val dModule = typeOf[A].member(newTermName("D"))
dModule: $r.intp.global.Symbol = object D
scala> val eModule = dModule.info.member(newTermName("E"))
eModule: $r.intp.global.Symbol = object E
scala> eModule.isMethod
res0: Boolean = false
scala> exitingPhase(currentRun.uncurryPhase)(eModule.isMethod)
res1: Boolean = true
scala> exitingPhase(currentRun.uncurryPhase)(eModule.info.finalResultType.typeSymbol.javaSimpleName)
res2: $r.intp.global.Name = E$
scala> exitingPhase(currentRun.flattenPhase)(eModule.info.finalResultType.typeSymbol.javaSimpleName)
res3: $r.intp.global.Name = $read$A$D$E$
scala> eModule.moduleClass.javaSimpleName
res5: $r.intp.global.Name = E$
scala> exitingPhase(currentRun.flattenPhase)(eModule.moduleClass.javaSimpleName)
res6: $r.intp.global.Name = $read$A$D$E$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment