summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-03-23 16:43:35 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-03-25 15:38:27 +0100
commit932626471f90c038511647400518d8c32607315b (patch)
tree2dc84cc4913dc21778343571b2e24bb9e03a17d8 /src
parentbcf24ec9ba07408ad9e8745135cc941ac3e76289 (diff)
downloadscala-932626471f90c038511647400518d8c32607315b.tar.gz
scala-932626471f90c038511647400518d8c32607315b.tar.bz2
scala-932626471f90c038511647400518d8c32607315b.zip
SI-8437 macro runtime now also picks inherited macro implementations
Previously it didn't matter much that we used Class.getDeclaredMethods instead of just getMethods, but with the introduction of macro bundles it can make a difference which is fixed in this commit. I'd also like to note that the fact that getMethods only returns public methods and getDeclaredMethods also sees private methods, doesn't make a difference, because macro implementations must be public.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala b/src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala
index ecdd48db22..be114efbc0 100644
--- a/src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala
+++ b/src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala
@@ -14,7 +14,7 @@ trait JavaReflectionRuntimes {
def resolveJavaReflectionRuntime(classLoader: ClassLoader): MacroRuntime = {
val implClass = Class.forName(className, true, classLoader)
- val implMeths = implClass.getDeclaredMethods.find(_.getName == methName)
+ val implMeths = implClass.getMethods.find(_.getName == methName)
// relies on the fact that macro impls cannot be overloaded
// so every methName can resolve to at maximum one method
val implMeth = implMeths getOrElse { throw new NoSuchMethodException(s"$className.$methName") }