summaryrefslogtreecommitdiff
path: root/test/disabled/pos
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-05-06 16:37:13 +0000
committerPaul Phillips <paulp@improving.org>2010-05-06 16:37:13 +0000
commitc55b106f503d5e712e69823cfeb1cab2460221eb (patch)
treea1af091d9a2eeb16ee4747930511db4996c47140 /test/disabled/pos
parentcb35c38f14f6a53c38966bde8e64dcfa9af17918 (diff)
downloadscala-c55b106f503d5e712e69823cfeb1cab2460221eb.tar.gz
scala-c55b106f503d5e712e69823cfeb1cab2460221eb.tar.bz2
scala-c55b106f503d5e712e69823cfeb1cab2460221eb.zip
Rolled partest back to r21328.
changes necessary to plug it back in while preserving everything which has happened since then in tests and such, but we should be the lookout for overreversion. Review by phaller (but as a formality, I don't think it requires direct review.)
Diffstat (limited to 'test/disabled/pos')
-rw-r--r--test/disabled/pos/spec-traits.scala83
-rw-r--r--test/disabled/pos/t1254/t1254.java28
2 files changed, 111 insertions, 0 deletions
diff --git a/test/disabled/pos/spec-traits.scala b/test/disabled/pos/spec-traits.scala
new file mode 100644
index 0000000000..9e339a14ad
--- /dev/null
+++ b/test/disabled/pos/spec-traits.scala
@@ -0,0 +1,83 @@
+trait A[@specialized(Int) T] { def foo: T }
+class B extends A[Int] { val foo = 10 }
+class C extends B
+
+// issue 3309
+class Lazy {
+ def test[U](block: => U): Unit = { block }
+
+ test { lazy val x = 1 }
+}
+
+// issue 3307
+class Bug3307 {
+ def f[Z](block: String => Z) {
+ block("abc")
+ }
+
+ ({ () =>
+ f { implicit x => println(x) } })()
+}
+
+// issue 3301
+ trait T[X]
+
+class Bug3301 {
+ def t[A]: T[A] = error("stub")
+
+ () => {
+ type X = Int
+
+ def foo[X] = t[X]
+ ()
+ }
+}
+// issue 3299
+object Failure {
+ def thunk() {
+ for (i <- 1 to 2) {
+ val Array(a, b) = Array(1,2)
+ ()
+ }
+ }
+}
+
+// issue 3296
+
+object AA
+{
+ def f(block: => Unit) {}
+
+ object BB
+ {
+ f {
+ object CC
+
+ ()
+ }
+ }
+
+ def foo[T](x: T) = { object A; false }
+}
+
+// issue 3292
+import scala.swing._
+import scala.swing.GridBagPanel._
+
+object Grid {
+
+ def later(code : => Unit) =
+ javax.swing.SwingUtilities.invokeLater(new Runnable { def run { code }})
+
+ def test = later {
+ val frame = new Dialog {
+ contents = new GridBagPanel {
+ val c = new Constraints
+ }
+ }
+ }
+
+}
+
+// issue 3325
+object O { def f[@specialized T] { for(k <- Nil: List[T]) { } } }
diff --git a/test/disabled/pos/t1254/t1254.java b/test/disabled/pos/t1254/t1254.java
new file mode 100644
index 0000000000..25b733cf28
--- /dev/null
+++ b/test/disabled/pos/t1254/t1254.java
@@ -0,0 +1,28 @@
+/* Taken from ticket #1254. Tests Java signatures in mirror classes and that
+ Nothing is translated to Nothing$.
+*/
+
+import scala.None;
+
+// This compiles with javac but fails with Eclipse java compiler:
+// 'The type scala.Nothing cannot be resolved. It is indirectly referenced from required .class files'
+class NothingBug3 {
+ public NothingBug3() {
+ scala.Option<?> o = scala.None$.MODULE$;
+
+ test(o);
+ None.toLeft(new scala.Function0<Integer>() {
+ public Integer apply() { return 0; }
+ });
+ }
+
+ public <T>void test(scala.Option<T> f) {}
+}
+
+// This compiles with javac but fails with Eclipse java compiler:
+// 'The type scala.Nothing cannot be resolved. It is indirectly referenced from required .class files'
+class NothingBug4 {
+ public NothingBug4() {
+ scala.Option o = scala.None$.MODULE$;
+ }
+}