Last active
August 29, 2015 14:23
-
-
Save lrytz/5a1a4779068f988c158e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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