summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/package-ob-case.check10
-rw-r--r--test/files/neg/package-ob-case.flags1
-rw-r--r--test/files/neg/package-ob-case.scala5
-rw-r--r--test/files/neg/t5760-pkgobj-warn.check4
-rw-r--r--test/files/neg/t5760-pkgobj-warn/stalepkg_1.scala11
-rw-r--r--test/files/neg/t5760-pkgobj-warn/stalepkg_2.scala11
-rw-r--r--test/files/neg/t5954.check18
-rw-r--r--test/files/neg/t5954.flags1
-rw-r--r--test/files/neg/t5954.scala46
9 files changed, 0 insertions, 107 deletions
diff --git a/test/files/neg/package-ob-case.check b/test/files/neg/package-ob-case.check
deleted file mode 100644
index 9b0ede1c6d..0000000000
--- a/test/files/neg/package-ob-case.check
+++ /dev/null
@@ -1,10 +0,0 @@
-package-ob-case.scala:3: warning: it is not recommended to define classes/objects inside of package objects.
-If possible, define class X in package foo instead.
- case class X(z: Int) { }
- ^
-package-ob-case.scala:3: warning: class X should be placed directly in package foo instead of package object foo. Under some circumstances companion objects and case classes in package objects can fail to recompile. See https://issues.scala-lang.org/browse/SI-5954.
- case class X(z: Int) { }
- ^
-error: No warnings can be incurred under -Xfatal-warnings.
-two warnings found
-one error found
diff --git a/test/files/neg/package-ob-case.flags b/test/files/neg/package-ob-case.flags
deleted file mode 100644
index 6c1dd108ae..0000000000
--- a/test/files/neg/package-ob-case.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfatal-warnings -Xlint \ No newline at end of file
diff --git a/test/files/neg/package-ob-case.scala b/test/files/neg/package-ob-case.scala
deleted file mode 100644
index 91a1fb7e48..0000000000
--- a/test/files/neg/package-ob-case.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-package foo {
- package object foo {
- case class X(z: Int) { }
- }
-}
diff --git a/test/files/neg/t5760-pkgobj-warn.check b/test/files/neg/t5760-pkgobj-warn.check
deleted file mode 100644
index a89398c3f7..0000000000
--- a/test/files/neg/t5760-pkgobj-warn.check
+++ /dev/null
@@ -1,4 +0,0 @@
-stalepkg_2.scala:6: error: Foo is already defined as class Foo in package object stalepkg
- class Foo
- ^
-one error found
diff --git a/test/files/neg/t5760-pkgobj-warn/stalepkg_1.scala b/test/files/neg/t5760-pkgobj-warn/stalepkg_1.scala
deleted file mode 100644
index ed4b731bb0..0000000000
--- a/test/files/neg/t5760-pkgobj-warn/stalepkg_1.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-
-package object stalepkg {
- class Foo
-}
-
-package stalepkg {
- object Test {
- def main(args: Array[String]) {
- }
- }
-}
diff --git a/test/files/neg/t5760-pkgobj-warn/stalepkg_2.scala b/test/files/neg/t5760-pkgobj-warn/stalepkg_2.scala
deleted file mode 100644
index 9abcdbab17..0000000000
--- a/test/files/neg/t5760-pkgobj-warn/stalepkg_2.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-
-package object stalepkg {
-}
-
-package stalepkg {
- class Foo
- object Test {
- def main(args: Array[String]) {
- }
- }
-}
diff --git a/test/files/neg/t5954.check b/test/files/neg/t5954.check
deleted file mode 100644
index 3950d14e4e..0000000000
--- a/test/files/neg/t5954.check
+++ /dev/null
@@ -1,18 +0,0 @@
-t5954.scala:36: warning: class D should be placed directly in package A instead of package object A. Under some circumstances companion objects and case classes in package objects can fail to recompile. See https://issues.scala-lang.org/browse/SI-5954.
- case class D()
- ^
-t5954.scala:35: warning: object C should be placed directly in package A instead of package object A. Under some circumstances companion objects and case classes in package objects can fail to recompile. See https://issues.scala-lang.org/browse/SI-5954.
- object C
- ^
-t5954.scala:34: warning: trait C should be placed directly in package A instead of package object A. Under some circumstances companion objects and case classes in package objects can fail to recompile. See https://issues.scala-lang.org/browse/SI-5954.
- trait C
- ^
-t5954.scala:33: warning: object B should be placed directly in package A instead of package object A. Under some circumstances companion objects and case classes in package objects can fail to recompile. See https://issues.scala-lang.org/browse/SI-5954.
- object B
- ^
-t5954.scala:32: warning: class B should be placed directly in package A instead of package object A. Under some circumstances companion objects and case classes in package objects can fail to recompile. See https://issues.scala-lang.org/browse/SI-5954.
- class B
- ^
-error: No warnings can be incurred under -Xfatal-warnings.
-5 warnings found
-one error found
diff --git a/test/files/neg/t5954.flags b/test/files/neg/t5954.flags
deleted file mode 100644
index 85d8eb2ba2..0000000000
--- a/test/files/neg/t5954.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfatal-warnings
diff --git a/test/files/neg/t5954.scala b/test/files/neg/t5954.scala
deleted file mode 100644
index 3ccb5ed3ff..0000000000
--- a/test/files/neg/t5954.scala
+++ /dev/null
@@ -1,46 +0,0 @@
-// if you ever think you've fixed the underlying reason for the warning
-// imposed by SI-5954, then here's a test that should pass with two "succes"es
-//
-//import scala.tools.partest._
-//
-//object Test extends DirectTest {
-// def code = ???
-//
-// def problemCode = """
-// package object A {
-// class B
-// object B
-// case class C()
-// }
-// """
-//
-// def compileProblemCode() = {
-// val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator")
-// compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(problemCode)
-// }
-//
-// def show() : Unit = {
-// for (i <- 0 until 2) {
-// compileProblemCode()
-// println(s"success ${i + 1}")
-// }
-// }
-//}
-
-package object A {
- // these should be prevented by the implementation restriction
- class B
- object B
- trait C
- object C
- case class D()
- // all the rest of these should be ok
- class E
- object F
- val g = "omg"
- var h = "wtf"
- def i = "lol"
- type j = String
- class K(val k : Int) extends AnyVal
- implicit class L(val l : Int)
-}