diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t6928.check | 7 | ||||
-rw-r--r-- | test/files/neg/t6928.scala | 10 | ||||
-rw-r--r-- | test/files/run/t6928-run.check | 1 | ||||
-rw-r--r-- | test/files/run/t6928-run.scala | 10 | ||||
-rwxr-xr-x | test/scaladoc/run/SI-191.scala | 8 |
5 files changed, 32 insertions, 4 deletions
diff --git a/test/files/neg/t6928.check b/test/files/neg/t6928.check new file mode 100644 index 0000000000..28b8e382dc --- /dev/null +++ b/test/files/neg/t6928.check @@ -0,0 +1,7 @@ +t6928.scala:2: error: super constructor cannot be passed a self reference unless parameter is declared by-name +object B extends A(B) + ^ +t6928.scala:3: error: super constructor cannot be passed a self reference unless parameter is declared by-name +object C extends A(null, null, C) + ^ +two errors found diff --git a/test/files/neg/t6928.scala b/test/files/neg/t6928.scala new file mode 100644 index 0000000000..84bdcde45a --- /dev/null +++ b/test/files/neg/t6928.scala @@ -0,0 +1,10 @@ +abstract class A( val someAs: A* ) +object B extends A(B) +object C extends A(null, null, C) + +object Test { + def main(args: Array[String]): Unit = { + println(B.someAs) + println(C.someAs) + } +} diff --git a/test/files/run/t6928-run.check b/test/files/run/t6928-run.check new file mode 100644 index 0000000000..a640c3e5fd --- /dev/null +++ b/test/files/run/t6928-run.check @@ -0,0 +1 @@ +3 As diff --git a/test/files/run/t6928-run.scala b/test/files/run/t6928-run.scala new file mode 100644 index 0000000000..87a8884d60 --- /dev/null +++ b/test/files/run/t6928-run.scala @@ -0,0 +1,10 @@ +abstract class A( val someAs: A* ) { + override def toString = someAs.length + " As" +} +object B extends A(null, null, null) + +object Test { + def main(args: Array[String]): Unit = { + println(B) + } +} diff --git a/test/scaladoc/run/SI-191.scala b/test/scaladoc/run/SI-191.scala index 6fb5339d66..29b1e7dd29 100755 --- a/test/scaladoc/run/SI-191.scala +++ b/test/scaladoc/run/SI-191.scala @@ -33,10 +33,10 @@ object Test extends ScaladocModelTest { def scalaURL = "http://bog.us" override def scaladocSettings = { - val scalaLibUri = getClass.getClassLoader.getResource("scala/Function1.class").toURI.getSchemeSpecificPart.split("!")(0) - val scalaLib = new File(new URL(scalaLibUri).getPath).getPath - val extArg = new URI("file", scalaLib, scalaURL).toString - "-no-link-warnings -doc-external-uris " + extArg + val scalaLibUri = getClass.getClassLoader.getResource("scala/Function1.class").getPath.split("!")(0) + val scalaLibPath = new URI(scalaLibUri).getPath + val externalArg = s"$scalaLibPath#$scalaURL" + "-no-link-warnings -doc-external-doc " + externalArg } def testModel(rootPackage: Package) { |