You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to Scala version 2.10.0-20120618-141100-416d58c599 (JavaHotSpot(TM) 64-BitServerVM, Java1.6.0_33).
Type in expressions to have them evaluated.
Type:help for more information.
scala>traitThirdParty { definvoke= println("right") }
traitWeatherIcon { definvoke= println("wrong") }
classMyClass {
objectobjAextendsThirdPartyobjectobjBextendsWeatherIcon
}
defined traitThirdParty
defined traitWeatherIcon
defined classMyClass
scala>valstuff= typeOf[MyClass].members.filter(_.isValue).filter(_.typeSignature <:< typeOf[ThirdParty])
stuff @de96c95: Iterable[reflect.runtime.universe.Symbol] =List(objectobjA)
scala>valobjASymbol= stuff.head.asModuleSymbol
objASymbol @ 5da6725c: reflect.runtime.universe.ModuleSymbol=objectobjA
scala> cm.reflect(newMyClass).reflectModule(objASymbol)
res0 @5551685f: reflect.runtime.universe.ModuleMirror= scala.reflect.runtime.JavaMirrors$JavaMirror$JavaModuleMirror@5551685f
scala> res0.companion
res1 @ 3b362ca8:Option[reflect.runtime.universe.ClassMirror] =None
scala> res0.instance
java.lang.Error: inner and nested modules are not supported yet
at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaModuleMirror.instance(JavaMirrors.scala:236)
(No description for SI-5498.)
The text was updated successfully, but these errors were encountered: