New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reflection still very non-deterministic #6573
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6573?orig=1 |
@xeno-by said (edited on Oct 28, 2012 5:36:51 AM UTC): |
@retronym said: I don't suggest to offer that functionality out of the box (maintaining and supporting that sort of code is expensive), but you might offer a hook at the point of mirror creation where the caller could provide a package enumerator. |
@clhodapp said: |
@clhodapp said (edited on Apr 29, 2013 3:42:50 AM UTC): package foo
import reflect.runtime.universe._
import reflect.runtime.{currentMirror=>cm}
class C
object Main extends App {
val pkg = cm.staticPackage("foo")
println(pkg.moduleClass.typeSignature.members)
pkg.moduleClass.typeSignature.member(newTypeName("Main"))
println(pkg.moduleClass.typeSignature.members)
cm.classLoader.loadClass("foo.C")
println(pkg.moduleClass.typeSignature.members)
pkg.moduleClass.typeSignature.member(newTypeName("C"))
println(pkg.moduleClass.typeSignature.members)
} [info] Running foo.Main
Scope{
}
Scope{
object Main;
class Main extends
}
Scope{
object Main;
class Main extends
}
Scope{
object C;
class C extends ;
object Main;
class Main extends
} |
The text was updated successfully, but these errors were encountered: