summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
index 683ed9317d..1b6b50a793 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -1015,13 +1015,17 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with
val methodInfo = module.thisType.memberInfo(m)
val paramJavaTypes = methodInfo.paramTypes map javaType
val paramNames = 0 until paramJavaTypes.length map ("x_" + _)
+ // TODO: evaluate the other flags we might be dropping on the floor here.
+ val flags = PublicStatic | (
+ if (m.isVarargsMethod) ACC_VARARGS else 0
+ )
/** Forwarders must not be marked final, as the JVM will not allow
* redefinition of a final static method, and we don't know what classes
* might be subclassing the companion class. See SI-4827.
*/
val mirrorMethod = jclass.addNewMethod(
- PublicStatic,
+ flags,
javaName(m),
javaType(methodInfo.resultType),
mkArray(paramJavaTypes),