summaryrefslogtreecommitdiff
path: root/test/files/neg/t5954.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-01-15 16:48:56 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-01-16 10:35:09 -0800
commit77dffe4aa79b414ab3f3a0a24c34140f1bbd6024 (patch)
tree9f737ea5aff9db636e5c01b3792c675463957b43 /test/files/neg/t5954.scala
parentef332d2a265ab86a6ec415be61b7896a83068bca (diff)
parent6f3ea77870ab5e17805ef0fc338c251e87870b8c (diff)
downloadscala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.tar.gz
scala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.tar.bz2
scala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.zip
Merge branch '2.10.x'
Conflicts: src/compiler/scala/tools/nsc/doc/Settings.scala src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala src/compiler/scala/tools/nsc/matching/Patterns.scala src/compiler/scala/tools/nsc/transform/UnCurry.scala src/compiler/scala/tools/nsc/typechecker/Infer.scala src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/settings/MutableSettings.scala src/reflect/scala/reflect/runtime/Settings.scala src/swing/scala/swing/SwingActor.scala src/swing/scala/swing/SwingWorker.scala test/files/run/t6955.scala
Diffstat (limited to 'test/files/neg/t5954.scala')
-rw-r--r--test/files/neg/t5954.scala46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/files/neg/t5954.scala b/test/files/neg/t5954.scala
new file mode 100644
index 0000000000..9e6f5392c7
--- /dev/null
+++ b/test/files/neg/t5954.scala
@@ -0,0 +1,46 @@
+// if you ever think you've fixed the underlying reason for the implementation restrictions
+// 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)
+}