diff --git a/build.xml b/build.xml
index d17df547a..6aff3ea99 100644
--- a/build.xml
+++ b/build.xml
@@ -476,8 +476,8 @@ QUICK BUILD (QUICK)
-
-
+
+
@@ -493,6 +493,7 @@ QUICK BUILD (QUICK)
+
@@ -509,6 +510,7 @@ QUICK BUILD (QUICK)
+
@@ -525,13 +527,13 @@ QUICK BUILD (QUICK)
-
-
+
+
-
+
@@ -554,8 +556,8 @@ QUICK BUILD (QUICK)
-
-
+
+
@@ -898,7 +900,7 @@ BOOTSTRAPPING BUILD (STRAP)
-
+
@@ -914,6 +916,7 @@ BOOTSTRAPPING BUILD (STRAP)
+
@@ -928,6 +931,7 @@ BOOTSTRAPPING BUILD (STRAP)
+
@@ -940,13 +944,13 @@ BOOTSTRAPPING BUILD (STRAP)
-
-
+
+
-
+
@@ -968,7 +972,7 @@ BOOTSTRAPPING BUILD (STRAP)
-
+
@@ -1129,7 +1133,7 @@ OPTIMISED COMPILER
-
+
@@ -1174,7 +1178,7 @@ OPTIMISED COMPILER
-
+
@@ -1203,7 +1207,7 @@ OPTIMISED COMPILER
-
+
@@ -1434,6 +1438,7 @@ BOOTRAPING TEST AND TEST SUITE
+
diff --git a/scala-lang.ipr b/scala-lang.ipr
index 08313cc82..8acf8dbff 100644
--- a/scala-lang.ipr
+++ b/scala-lang.ipr
@@ -6,7 +6,7 @@
-
+
@@ -15,7 +15,37 @@
-
+
@@ -52,6 +82,870 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -227,11 +1121,10 @@
-
-
+
@@ -250,7 +1143,8 @@
-
+
+
@@ -297,6 +1191,7 @@
+
@@ -327,6 +1222,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/partest/scala/tools/partest/PartestTask.scala b/src/partest/scala/tools/partest/PartestTask.scala
index 56acbce0d..a15305bb0 100644
--- a/src/partest/scala/tools/partest/PartestTask.scala
+++ b/src/partest/scala/tools/partest/PartestTask.scala
@@ -56,6 +56,10 @@ class PartestTask extends Task {
shootoutFiles = Some(input)
}
+ def addConfiguredScalapTests(input: FileSet) {
+ scalapFiles = Some(input)
+ }
+
def setClasspath(input: Path) {
if (classpath.isEmpty)
classpath = Some(input)
@@ -119,6 +123,7 @@ class PartestTask extends Task {
private var residentFiles: Option[FileSet] = None
private var scriptFiles: Option[FileSet] = None
private var shootoutFiles: Option[FileSet] = None
+ private var scalapFiles: Option[FileSet] = None
private var errorOnFailed: Boolean = false
private var scalacOpts: Option[String] = None
private var timeout: Option[String] = None
@@ -158,6 +163,7 @@ class PartestTask extends Task {
private def getResidentFiles = getFiles(residentFiles)
private def getScriptFiles = getFiles(scriptFiles)
private def getShootoutFiles = getFiles(shootoutFiles)
+ private def getScalapFiles = getFiles(scalapFiles)
override def execute() {
if (debug)
@@ -285,6 +291,13 @@ class PartestTask extends Task {
allFailures += failures
}
+ if (getScalapFiles.size > 0) {
+ log("Running scalap tests")
+ val (successes, failures) = runTestsForFiles(getScalapFiles, "scalap")
+ allSucesses += successes
+ allFailures += failures
+ }
+
if ((getPosFiles.size + getNegFiles.size + getRunFiles.size + getResidentFiles.size + getScriptFiles.size + getShootoutFiles.size) == 0)
log("There where no tests to run.")
else if (allFailures == 0)
diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala
index 63a3c62bc..c67ba3ef9 100644
--- a/src/partest/scala/tools/partest/nest/CompileManager.scala
+++ b/src/partest/scala/tools/partest/nest/CompileManager.scala
@@ -105,6 +105,7 @@ class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler {
case "jvm" => JvmTestFile(files(0), fileManager, out.isEmpty)
case "jvm5" => Jvm5TestFile(files(0), fileManager, out.isEmpty)
case "shootout" => ShootoutTestFile(files(0), fileManager, out.isEmpty)
+ case "scalap" => ScalapTestFile(files(0), fileManager, out.isEmpty)
case "scalacheck" =>
ScalaCheckTestFile(files(0), fileManager, out.isEmpty)
}
diff --git a/src/partest/scala/tools/partest/nest/TestFile.scala b/src/partest/scala/tools/partest/nest/TestFile.scala
index f67e92818..76af4acc1 100644
--- a/src/partest/scala/tools/partest/nest/TestFile.scala
+++ b/src/partest/scala/tools/partest/nest/TestFile.scala
@@ -106,3 +106,12 @@ case class ShootoutTestFile(override val file: File, override val fileManager: F
settings.outdir.value = file.getParent
}
}
+
+case class ScalapTestFile(override val file: File, override val fileManager: FileManager, createOutDir: Boolean) extends TestFile("scalap", file, fileManager, createOutDir) {
+ override def defineSettings(settings: Settings) {
+ baseSettings(settings)
+ settings.classpath.value = settings.classpath.value+
+ File.pathSeparator+fileManager.CLASSPATH
+ settings.outdir.value = file.getParent
+ }
+}
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index bc7f962ac..e968999fa 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -7,17 +7,15 @@
package scala.tools.partest.nest
-import java.io.{File, FileInputStream, FileOutputStream, PrintStream,
- PrintWriter, StringWriter, FileWriter, InputStreamReader,
- FileReader, OutputStreamWriter, BufferedReader}
-
-import java.net.URL
+import java.io._
+import java.net.{URLClassLoader, URL}
import java.util.{Timer, TimerTask}
import scala.tools.nsc.{ObjectRunner, GenericRunnerCommand}
import scala.actors.{Actor, Exit, TIMEOUT}
import scala.actors.Actor._
+import scalap.scalax.rules.scalasig.{ByteCode, ClassFileParser, ScalaSigAttributeParsers}
case class RunTests(kind: String, files: List[File])
case class Results(succ: Int, fail: Int, logs: List[LogFile], outdirs: List[File])
@@ -457,7 +455,7 @@ class Worker(val fileManager: FileManager) extends Actor {
NestUI.verbose("loading classes from:")
urlArr foreach {url => NestUI.verbose(url.toString)}
val loader = new java.net.URLClassLoader(urlArr, fileManager.getClass.getClassLoader)
-
+
(try {
Some(Class.forName("ScalaCheckHelper", true, loader))
} catch {
@@ -501,7 +499,7 @@ class Worker(val fileManager: FileManager) extends Actor {
diff = file2String(logFile)
} else
diff = compareOutput(dir, fileBase, kind, logFile)
-
+
if (!diff.equals("")) {
NestUI.verbose("output differs from log file\n")
succeeded = false
@@ -649,15 +647,15 @@ class Worker(val fileManager: FileManager) extends Actor {
})
logFileReader.close()
tempLogFilePrinter.close()
-
+
val tempLogFileReader = new BufferedReader(new FileReader(tempLogFile))
val logFilePrinter= new PrintWriter(new FileWriter(logFile), true)
(new StreamAppender(tempLogFileReader, logFilePrinter)).run
tempLogFileReader.close()
logFilePrinter.close()
-
+
tempLogFile.delete()
-
+
diff = compareOutput(dir, fileBase, kind, logFile)
if (!diff.equals("")) {
NestUI.verbose("output differs from log file\n")
@@ -714,7 +712,7 @@ class Worker(val fileManager: FileManager) extends Actor {
} else {
NestUI.verbose("compilation of "+testFile+"succeeded")
// -------- run test --------
-
+
//TODO: detect whether we have to use Runtime.exec
val useRuntime = true
@@ -741,6 +739,61 @@ class Worker(val fileManager: FileManager) extends Actor {
LogContext(logFile, None)
}
+ case "scalap" => {
+
+ def decompileFile(clazz: Class[_]) = {
+ val byteCode = ByteCode.forClass(clazz)
+ val classFile = ClassFileParser.parse(byteCode)
+ val Some(sig) = classFile.attribute("ScalaSig").map(_.byteCode).map(ScalaSigAttributeParsers.parse)
+ import scala.tools.scalap.Main._
+ parseScalaSignature(sig)
+ }
+
+ runInContext(file, kind, (logFile: File, outDir: File) => {
+ val sourceDir = file.getParentFile
+ val sourceDirName = sourceDir.getName
+
+ // 1. Find file with result text
+ val results = sourceDir.listFiles(new FilenameFilter {
+ def accept(dir: File, name: String) = name == "result.test"
+ })
+
+ if (results.length != 1) {
+ NestUI.verbose("Result file not found in directory " + sourceDirName + " \n")
+ } else {
+ val resFile = results(0)
+ // 2. Compile source file
+ if (!compileMgr.shouldCompile(outDir, List(file), kind, logFile)) {
+ succeeded = false
+ } else {
+
+ // 3. Decompile file and compare results
+ val className = sourceDirName.capitalize
+ val url = outDir.toURI.toURL
+ val loader = new URLClassLoader(Array(url), getClass.getClassLoader)
+ val clazz = loader.loadClass(className)
+
+ val result = decompileFile(clazz)
+
+ try {
+ val fstream = new FileWriter(logFile);
+ val out = new BufferedWriter(fstream);
+ out.write(result)
+ out.close();
+ } catch {
+ case e: IOException => NestUI.verbose(e.getMessage()); succeeded = false
+ }
+
+ val diff = fileManager.compareFiles(logFile, resFile)
+ if (!diff.equals("")) {
+ NestUI.verbose("output differs from log file\n")
+ succeeded = false
+ }
+ }
+ }
+ })
+ }
+
case "script" => {
val osName = System.getProperty("os.name", "")
// when option "--failed" is provided
@@ -787,7 +840,7 @@ class Worker(val fileManager: FileManager) extends Actor {
async.start()
inApp.run()
async.join()
-
+
writer.close()
diff = compareOutput(file.getParentFile, fileBase, kind, logFile)
@@ -827,7 +880,7 @@ class Worker(val fileManager: FileManager) extends Actor {
if (!logs.isEmpty)
logs.get.writers match {
case Some((swr, wr)) =>
- printInfoEnd(succeeded, wr)
+ printInfoEnd(succeeded, wr)
wr.flush()
swr.flush()
NestUI.normal(swr.toString)
@@ -867,7 +920,7 @@ class Worker(val fileManager: FileManager) extends Actor {
}
parent ! result
}
-
+
react {
case 'timeout =>
val swr = new StringWriter
diff --git a/src/scala-lang.iml b/src/scala-lang.iml
index 365c7cd7f..d74dfe833 100644
--- a/src/scala-lang.iml
+++ b/src/scala-lang.iml
@@ -7,6 +7,9 @@
+
+
+
@@ -22,19 +25,12 @@
-
+
-
-
-
-
-
-
-
-
-
+
+
diff --git a/test/files/scalap/abstractClass/A.scala b/test/files/scalap/abstractClass/A.scala
new file mode 100644
index 000000000..31fc819ae
--- /dev/null
+++ b/test/files/scalap/abstractClass/A.scala
@@ -0,0 +1,5 @@
+abstract class AbstractClass {
+
+ def foo: String
+
+}
\ No newline at end of file
diff --git a/test/files/scalap/abstractClass/result.test b/test/files/scalap/abstractClass/result.test
new file mode 100644
index 000000000..548335333
--- /dev/null
+++ b/test/files/scalap/abstractClass/result.test
@@ -0,0 +1,4 @@
+abstract class AbstractClass extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def foo : scala.Predef.String
+}
\ No newline at end of file
diff --git a/test/files/scalap/abstractMethod/A.scala b/test/files/scalap/abstractMethod/A.scala
new file mode 100644
index 000000000..419abdaa6
--- /dev/null
+++ b/test/files/scalap/abstractMethod/A.scala
@@ -0,0 +1,4 @@
+trait AbstractMethod {
+ def arity: Int
+ def isCool = true
+}
\ No newline at end of file
diff --git a/test/files/scalap/abstractMethod/result.test b/test/files/scalap/abstractMethod/result.test
new file mode 100644
index 000000000..8668a7761
--- /dev/null
+++ b/test/files/scalap/abstractMethod/result.test
@@ -0,0 +1,5 @@
+trait AbstractMethod extends java.lang.Object with scala.ScalaObject {
+ def $init$() : scala.Unit = { /* compiled code */ }
+ def arity : scala.Int
+ def isCool : scala.Boolean = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/caseClass/A.scala b/test/files/scalap/caseClass/A.scala
new file mode 100644
index 000000000..3addfbdaa
--- /dev/null
+++ b/test/files/scalap/caseClass/A.scala
@@ -0,0 +1,3 @@
+case class CaseClass[A <: Seq[Int]](i: A, s: String) {
+ def foo = 239
+}
\ No newline at end of file
diff --git a/test/files/scalap/caseClass/result.test b/test/files/scalap/caseClass/result.test
new file mode 100644
index 000000000..5057f87a3
--- /dev/null
+++ b/test/files/scalap/caseClass/result.test
@@ -0,0 +1,11 @@
+case class CaseClass[A >: scala.Nothing <: scala.Seq[scala.Int]](a : A, s : scala.Predef.String) extends java.lang.Object with scala.ScalaObject with scala.Product {
+ val i : A = { /* compiled code */ }
+ val s : scala.Predef.String = { /* compiled code */ }
+ def foo : scala.Int = { /* compiled code */ }
+ override def hashCode() : scala.Int = { /* compiled code */ }
+ override def toString() : scala.Predef.String = { /* compiled code */ }
+ override def equals(a : scala.Any) : scala.Boolean = { /* compiled code */ }
+ override def productPrefix : java.lang.String = { /* compiled code */ }
+ override def productArity : scala.Int = { /* compiled code */ }
+ override def productElement(i : scala.Int) : scala.Any = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/caseObject/A.scala b/test/files/scalap/caseObject/A.scala
new file mode 100644
index 000000000..7c1541684
--- /dev/null
+++ b/test/files/scalap/caseObject/A.scala
@@ -0,0 +1,3 @@
+case object CaseObject {
+ def bar = 239
+}
\ No newline at end of file
diff --git a/test/files/scalap/caseObject/result.test b/test/files/scalap/caseObject/result.test
new file mode 100644
index 000000000..c265c8a52
--- /dev/null
+++ b/test/files/scalap/caseObject/result.test
@@ -0,0 +1,8 @@
+final case object CaseObject extends java.lang.Object with scala.ScalaObject with scala.Product {
+ def bar : scala.Int = { /* compiled code */ }
+ final override def toString() : java.lang.String = { /* compiled code */ }
+ override def productPrefix : java.lang.String = { /* compiled code */ }
+ override def productArity : scala.Int = { /* compiled code */ }
+ override def productElement(i : scala.Int) : scala.Any = { /* compiled code */ }
+ protected def readResolve() : java.lang.Object = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/cbnParam/A.scala b/test/files/scalap/cbnParam/A.scala
new file mode 100644
index 000000000..d804ba650
--- /dev/null
+++ b/test/files/scalap/cbnParam/A.scala
@@ -0,0 +1 @@
+class CbnParam(s: => String)
\ No newline at end of file
diff --git a/test/files/scalap/cbnParam/result.test b/test/files/scalap/cbnParam/result.test
new file mode 100644
index 000000000..7b1822898
--- /dev/null
+++ b/test/files/scalap/cbnParam/result.test
@@ -0,0 +1,3 @@
+class CbnParam extends java.lang.Object with scala.ScalaObject {
+ def this(s : => scala.Predef.String) = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/classWithExistential/A.scala b/test/files/scalap/classWithExistential/A.scala
new file mode 100644
index 000000000..2a77a842c
--- /dev/null
+++ b/test/files/scalap/classWithExistential/A.scala
@@ -0,0 +1,3 @@
+class ClassWithExistential {
+ def foo[A, B] : A=> B forSome {type A <: Seq[Int]; type B >: String} = null
+}
\ No newline at end of file
diff --git a/test/files/scalap/classWithExistential/result.test b/test/files/scalap/classWithExistential/result.test
new file mode 100644
index 000000000..377edff7e
--- /dev/null
+++ b/test/files/scalap/classWithExistential/result.test
@@ -0,0 +1,4 @@
+class ClassWithExistential extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def foo[A >: scala.Nothing <: scala.Any, B >: scala.Nothing <: scala.Any] : scala.Function1[A, B forSome {type A >: scala.Nothing <: scala.Seq[scala.Int]; type B >: scala.Predef.String <: scala.Any}] = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/classWithSelfAnnotation/A.scala b/test/files/scalap/classWithSelfAnnotation/A.scala
new file mode 100644
index 000000000..f66563069
--- /dev/null
+++ b/test/files/scalap/classWithSelfAnnotation/A.scala
@@ -0,0 +1,4 @@
+class ClassWithSelfAnnotation {
+ this: CharSequence =>
+ def foo = 239
+}
\ No newline at end of file
diff --git a/test/files/scalap/classWithSelfAnnotation/result.test b/test/files/scalap/classWithSelfAnnotation/result.test
new file mode 100644
index 000000000..9e20790fa
--- /dev/null
+++ b/test/files/scalap/classWithSelfAnnotation/result.test
@@ -0,0 +1,5 @@
+class ClassWithSelfAnnotation extends java.lang.Object with scala.ScalaObject {
+ this : ClassWithSelfAnnotation with java.lang.CharSequence =>
+ def this() = { /* compiled code */ }
+ def foo : scala.Int = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/covariantParam/A.scala b/test/files/scalap/covariantParam/A.scala
new file mode 100644
index 000000000..19fb8805b
--- /dev/null
+++ b/test/files/scalap/covariantParam/A.scala
@@ -0,0 +1,3 @@
+class CovariantParam[+A] {
+ def foo[A](a: A) = 42
+}
\ No newline at end of file
diff --git a/test/files/scalap/covariantParam/result.test b/test/files/scalap/covariantParam/result.test
new file mode 100644
index 000000000..e7c4a00bc
--- /dev/null
+++ b/test/files/scalap/covariantParam/result.test
@@ -0,0 +1,4 @@
+class CovariantParam[+A >: scala.Nothing <: scala.Any] extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def foo[A >: scala.Nothing <: scala.Any](a : A) : scala.Int = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/implicitParam/A.scala b/test/files/scalap/implicitParam/A.scala
new file mode 100644
index 000000000..5a5c88bc6
--- /dev/null
+++ b/test/files/scalap/implicitParam/A.scala
@@ -0,0 +1,3 @@
+class ImplicitParam {
+ def foo(i: Int)(implicit f: Float, d: Double) = 42
+}
\ No newline at end of file
diff --git a/test/files/scalap/implicitParam/result.test b/test/files/scalap/implicitParam/result.test
new file mode 100644
index 000000000..4d2f49e80
--- /dev/null
+++ b/test/files/scalap/implicitParam/result.test
@@ -0,0 +1,4 @@
+class ImplicitParam extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def foo(i : scala.Int)(implicit f : scala.Float, d : scala.Double) : scala.Int = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/paramClauses/A.scala b/test/files/scalap/paramClauses/A.scala
new file mode 100644
index 000000000..bcc76f50e
--- /dev/null
+++ b/test/files/scalap/paramClauses/A.scala
@@ -0,0 +1,3 @@
+class ParamClauses {
+ def foo(i: Int)(s: String)(t: Double) = 239
+}
\ No newline at end of file
diff --git a/test/files/scalap/paramClauses/result.test b/test/files/scalap/paramClauses/result.test
new file mode 100644
index 000000000..4a3138d3c
--- /dev/null
+++ b/test/files/scalap/paramClauses/result.test
@@ -0,0 +1,4 @@
+class ParamClauses extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def foo(i : scala.Int)(s : scala.Predef.String)(d : scala.Double) : scala.Int = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/paramNames/A.scala b/test/files/scalap/paramNames/A.scala
new file mode 100644
index 000000000..7ba9ff0fe
--- /dev/null
+++ b/test/files/scalap/paramNames/A.scala
@@ -0,0 +1,3 @@
+class ParamNames {
+ def foo (s: => Seq[Int], s2: => Seq[Any]) {}
+}
diff --git a/test/files/scalap/paramNames/result.test b/test/files/scalap/paramNames/result.test
new file mode 100644
index 000000000..2d59f72ec
--- /dev/null
+++ b/test/files/scalap/paramNames/result.test
@@ -0,0 +1,4 @@
+class ParamNames extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def foo(s : => scala.Seq[scala.Int], s : => scala.Seq[scala.Any]) : scala.Unit = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/sequenceParam/A.scala b/test/files/scalap/sequenceParam/A.scala
new file mode 100644
index 000000000..98874fafb
--- /dev/null
+++ b/test/files/scalap/sequenceParam/A.scala
@@ -0,0 +1 @@
+class SequenceParam(s: String, i: Int*)
\ No newline at end of file
diff --git a/test/files/scalap/sequenceParam/result.test b/test/files/scalap/sequenceParam/result.test
new file mode 100644
index 000000000..a4769c81d
--- /dev/null
+++ b/test/files/scalap/sequenceParam/result.test
@@ -0,0 +1,3 @@
+class SequenceParam extends java.lang.Object with scala.ScalaObject {
+ def this(s : scala.Predef.String, s : scala.Int*) = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/simpleClass/A.scala b/test/files/scalap/simpleClass/A.scala
new file mode 100644
index 000000000..04a2f5ee3
--- /dev/null
+++ b/test/files/scalap/simpleClass/A.scala
@@ -0,0 +1,3 @@
+class SimpleClass {
+ def foo = 239
+}
\ No newline at end of file
diff --git a/test/files/scalap/simpleClass/result.test b/test/files/scalap/simpleClass/result.test
new file mode 100644
index 000000000..b2ed8d0b3
--- /dev/null
+++ b/test/files/scalap/simpleClass/result.test
@@ -0,0 +1,4 @@
+class SimpleClass extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def foo : scala.Int = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/traitObject/A.scala b/test/files/scalap/traitObject/A.scala
new file mode 100644
index 000000000..3ad9c4954
--- /dev/null
+++ b/test/files/scalap/traitObject/A.scala
@@ -0,0 +1,7 @@
+trait TraitObject {
+ def foo = 239
+}
+
+object TraitObject {
+ def bar = 42
+}
\ No newline at end of file
diff --git a/test/files/scalap/traitObject/result.test b/test/files/scalap/traitObject/result.test
new file mode 100644
index 000000000..dc5b9b5f9
--- /dev/null
+++ b/test/files/scalap/traitObject/result.test
@@ -0,0 +1,8 @@
+trait TraitObject extends java.lang.Object with scala.ScalaObject {
+ def $init$() : scala.Unit = { /* compiled code */ }
+ def foo : scala.Int = { /* compiled code */ }
+}
+final object TraitObject extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def bar : scala.Int = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/valAndVar/A.scala b/test/files/scalap/valAndVar/A.scala
new file mode 100644
index 000000000..2d8934840
--- /dev/null
+++ b/test/files/scalap/valAndVar/A.scala
@@ -0,0 +1,4 @@
+class ValAndVar {
+ val foo = ""
+ var bar = 42
+}
diff --git a/test/files/scalap/valAndVar/result.test b/test/files/scalap/valAndVar/result.test
new file mode 100644
index 000000000..011d57c64
--- /dev/null
+++ b/test/files/scalap/valAndVar/result.test
@@ -0,0 +1,5 @@
+class ValAndVar extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ val foo : java.lang.String = { /* compiled code */ }
+ var bar : scala.Int = { /* compiled code */ }
+}
\ No newline at end of file
diff --git a/test/files/scalap/wildcardType/A.scala b/test/files/scalap/wildcardType/A.scala
new file mode 100644
index 000000000..d99841cb3
--- /dev/null
+++ b/test/files/scalap/wildcardType/A.scala
@@ -0,0 +1 @@
+class WildcardType(f: Int => _)
\ No newline at end of file
diff --git a/test/files/scalap/wildcardType/result.test b/test/files/scalap/wildcardType/result.test
new file mode 100644
index 000000000..78a24ef22
--- /dev/null
+++ b/test/files/scalap/wildcardType/result.test
@@ -0,0 +1,3 @@
+class WildcardType extends java.lang.Object with scala.ScalaObject {
+ def this(f : scala.Function1[scala.Int, _]) = { /* compiled code */ }
+}
\ No newline at end of file