diff options
-rw-r--r-- | build.sbt | 10 | ||||
-rw-r--r-- | src/compiler/rootdoc.txt | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/UnCurry.scala | 2 | ||||
-rw-r--r-- | test/files/run/t10059/A.java | 3 | ||||
-rw-r--r-- | test/files/run/t10059/Test.scala | 9 |
5 files changed, 24 insertions, 7 deletions
@@ -418,6 +418,16 @@ lazy val compiler = configureAsSubproject(project) (unmanagedResourceDirectories in Compile in LocalProject("repl")).value base ** ((includeFilter in unmanagedResources in Compile).value || "*.scala" || "*.psd" || "*.ai" || "*.java") pair relativeTo(base) }, + // Include the additional projects in the scaladoc JAR: + sources in Compile in doc ++= { + val base = + (unmanagedSourceDirectories in Compile in LocalProject("interactive")).value ++ + (unmanagedSourceDirectories in Compile in LocalProject("scaladoc")).value ++ + (unmanagedSourceDirectories in Compile in LocalProject("repl")).value + ((base ** ("*.scala" || "*.java")) + --- (base ** "Scaladoc*ModelTest.scala") // exclude test classes that depend on partest + ).get + }, scalacOptions in Compile in doc ++= Seq( "-doc-root-content", (sourceDirectory in Compile).value + "/rootdoc.txt" ), diff --git a/src/compiler/rootdoc.txt b/src/compiler/rootdoc.txt index 173f604098..25808dec89 100644 --- a/src/compiler/rootdoc.txt +++ b/src/compiler/rootdoc.txt @@ -1,6 +1 @@ -The Scala compiler API. - -The following resources are useful for Scala plugin/compiler development: - - [[http://www.scala-lang.org/node/215 Scala development tutorials]] on [[http://www.scala-lang.org www.scala-lang.org]] - - [[https://wiki.scala-lang.org/display/SIW/ Scala Internals wiki]] - - [[http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/ Scala compiler corner]], maintained by Miguel +The Scala compiler and reflection APIs. diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index f6c667353f..d8fa7b58e8 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -747,7 +747,7 @@ abstract class UnCurry extends InfoTransform if (!dd.symbol.hasAnnotation(VarargsClass) || !enteringUncurry(mexists(dd.symbol.paramss)(sym => definitions.isRepeatedParamType(sym.tpe)))) return flatdd - val forwSym = currentClass.newMethod(dd.name.toTermName, dd.pos, VARARGS | SYNTHETIC | flatdd.symbol.flags) + val forwSym = currentClass.newMethod(dd.name.toTermName, dd.pos, VARARGS | SYNTHETIC | flatdd.symbol.flags & ~DEFERRED) val isRepeated = enteringUncurry(dd.symbol.info.paramss.flatten.map(sym => definitions.isRepeatedParamType(sym.tpe))) diff --git a/test/files/run/t10059/A.java b/test/files/run/t10059/A.java new file mode 100644 index 0000000000..49b6447817 --- /dev/null +++ b/test/files/run/t10059/A.java @@ -0,0 +1,3 @@ +public class A { + public static int foo(T t) { return t.m(1, 2, 3); } +} diff --git a/test/files/run/t10059/Test.scala b/test/files/run/t10059/Test.scala new file mode 100644 index 0000000000..7bbb623e74 --- /dev/null +++ b/test/files/run/t10059/Test.scala @@ -0,0 +1,9 @@ +abstract class T { + @annotation.varargs def m(l: Int*): Int +} +class C extends T { + override def m(l: Int*): Int = 1 +} +object Test extends App { + assert(A.foo(new C) == 1) +} |