summaryrefslogtreecommitdiff
path: root/test/pending/neg
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-03 03:19:21 +0000
committerPaul Phillips <paulp@improving.org>2010-10-03 03:19:21 +0000
commit2fefb37220f82300e2aa44442f1a42261d65e359 (patch)
tree24267661fa20065cf33c70d9860774b145673565 /test/pending/neg
parent943fbb1363345fdaca55e5df95059e8ce8c1344b (diff)
downloadscala-2fefb37220f82300e2aa44442f1a42261d65e359.tar.gz
scala-2fefb37220f82300e2aa44442f1a42261d65e359.tar.bz2
scala-2fefb37220f82300e2aa44442f1a42261d65e359.zip
One last batch of test cleanups and I think I'l...
One last batch of test cleanups and I think I'll call it a day. If you're worried I didn't leave any for anyone else, let me put your fears to rest. PLENTY left to sift through. No review.
Diffstat (limited to 'test/pending/neg')
-rw-r--r--test/pending/neg/bug1210.check7
-rw-r--r--test/pending/neg/bug1210.scala10
-rw-r--r--test/pending/neg/bug1987.scala14
-rw-r--r--test/pending/neg/bug963.scala (renamed from test/pending/neg/t2079.scala)1
-rw-r--r--test/pending/neg/t0513.scala6
-rw-r--r--test/pending/neg/t0625.check7
-rw-r--r--test/pending/neg/t0625.scala4
-rw-r--r--test/pending/neg/t0653.check5
-rw-r--r--test/pending/neg/t0653.scala28
-rw-r--r--test/pending/neg/t1038.check4
-rw-r--r--test/pending/neg/t1038.scala7
-rw-r--r--test/pending/neg/t1845.scala12
-rw-r--r--test/pending/neg/t2078.scala9
-rw-r--r--test/pending/neg/t2180.scala31
14 files changed, 27 insertions, 118 deletions
diff --git a/test/pending/neg/bug1210.check b/test/pending/neg/bug1210.check
deleted file mode 100644
index 4db920556f..0000000000
--- a/test/pending/neg/bug1210.check
+++ /dev/null
@@ -1,7 +0,0 @@
-bug1210.scala:13: error: illegal cyclic reference involving type Settings
- val v: List[selfType] = f[selfType]((x: selfType) => x.v)
- ^
-bug1210.scala:24: error: illegal cyclic reference involving type Settings
- f[selfType](_.g)
- ^
-two errors found
diff --git a/test/pending/neg/bug1210.scala b/test/pending/neg/bug1210.scala
deleted file mode 100644
index fc2c954ff2..0000000000
--- a/test/pending/neg/bug1210.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-object Test {
- def id[T](f: T => T): T = error("bla")
-
- abstract class M { self =>
- type Settings
- type selfType = M {type Settings = self.Settings}
-
- val v: selfType = id[M.this.selfType](_.v)
- }
-}
diff --git a/test/pending/neg/bug1987.scala b/test/pending/neg/bug1987.scala
deleted file mode 100644
index d45f1b0f0d..0000000000
--- a/test/pending/neg/bug1987.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-// Copyright Shunsuke Sogame 2008-2009.
-// Distributed under the terms of an MIT-style license.
-
-
-package object overloading {
- def bar(f: (Int) => Unit): Unit = ()
- def bar(f: (Int, Int) => Unit): Unit = ()
-}
-
-class PackageObjectOverloadingTest {
- overloading.bar( (i: Int) => () ) // doesn't compile.
-}
diff --git a/test/pending/neg/t2079.scala b/test/pending/neg/bug963.scala
index a86674c7e0..430ef090e4 100644
--- a/test/pending/neg/t2079.scala
+++ b/test/pending/neg/bug963.scala
@@ -1,3 +1,4 @@
+// Soundness bug, at #963 and dup at #2079.
trait A {
type T
var v : T
diff --git a/test/pending/neg/t0513.scala b/test/pending/neg/t0513.scala
deleted file mode 100644
index 0082b0e563..0000000000
--- a/test/pending/neg/t0513.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-object Test {
- case class Y[T1, T2 <: T1]
- //val test = Y[Nothing, Int] // Compiler error
- case class Test[T]
- val test2 = Test[Y[Nothing, Int]] // No error
-}
diff --git a/test/pending/neg/t0625.check b/test/pending/neg/t0625.check
deleted file mode 100644
index 45a35eb157..0000000000
--- a/test/pending/neg/t0625.check
+++ /dev/null
@@ -1,7 +0,0 @@
-<insert expected error message, current one is the following>
-
-t0625.scala:3: error: inferred the kinds of the type arguments (Option[B],Int) do not conform to the expected kinds of the type parameters (type C,type T).
-Option[B]'s type parameters do not match type C's expected parameters: class Option has one type parameter, but type C has one
- idMap(Some(0))
- ^
-one error found
diff --git a/test/pending/neg/t0625.scala b/test/pending/neg/t0625.scala
deleted file mode 100644
index a44a04fd97..0000000000
--- a/test/pending/neg/t0625.scala
+++ /dev/null
@@ -1,4 +0,0 @@
-object Test {
- def idMap[C[_],T](m: { def map[U](f: T => U): C[U] }): C[T] = m.map(t => t)
- idMap(Some(0))
-}
diff --git a/test/pending/neg/t0653.check b/test/pending/neg/t0653.check
deleted file mode 100644
index cb5ca65b8e..0000000000
--- a/test/pending/neg/t0653.check
+++ /dev/null
@@ -1,5 +0,0 @@
-t0653.scala:5: error: inferred the kinds of the type arguments (InL[Nothing,Nothing]) do not conform to the expected kinds of the type parameters (type Op) in class Fix.
-InL[Nothing,Nothing]'s type parameters do not match type Op's expected parameters: class InL has two type parameters, but type Op has one
- val zero = new Fix(new InL)
- ^
-one error found
diff --git a/test/pending/neg/t0653.scala b/test/pending/neg/t0653.scala
index 156aa2d701..48f39447ba 100644
--- a/test/pending/neg/t0653.scala
+++ b/test/pending/neg/t0653.scala
@@ -1,6 +1,30 @@
-class InL[A, B]
+// What is this test in place to test for?
+//
+class One[A]
+class Two[A, B]
class Fix[Op[A]](x : Op[Fix[Op]])
class FixTest {
- val zero = new Fix(new InL)
+ // works
+ // val zero = new Fix[One](new One)
+
+ // don't work:
+ val two = new Fix(new Two) // this was what I found here
+ val zero = new Fix(new One) // this seems like something which could plausibly work
+
+ // neg/t0653.scala:12: error: no type parameters for constructor Fix: (x: Op[Fix[Op[A]]])Fix[Op[A]] exist so that it can be applied to arguments (Two[Nothing,Nothing])
+ // --- because ---
+ // argument expression's type is not compatible with formal parameter type;
+ // found : Two[Nothing,Nothing]
+ // required: ?Op[ Fix[?Op[ A ]] ]
+ // val two = new Fix(new Two) // this was what I found here
+ // ^
+ // neg/t0653.scala:13: error: no type parameters for constructor Fix: (x: Op[Fix[Op[A]]])Fix[Op[A]] exist so that it can be applied to arguments (One[Nothing])
+ // --- because ---
+ // argument expression's type is not compatible with formal parameter type;
+ // found : One[Nothing]
+ // required: ?Op[ Fix[?Op[ A ]] ]
+ // val zero = new Fix(new One) // this seems like something which could plausibly work
+ // ^
+ // two errors found
}
diff --git a/test/pending/neg/t1038.check b/test/pending/neg/t1038.check
deleted file mode 100644
index 3bfd479f42..0000000000
--- a/test/pending/neg/t1038.check
+++ /dev/null
@@ -1,4 +0,0 @@
-t1038.scala:4: error: wrong number of arguments for constructor X: (Int)X
- val a = new X
- ^
-one error found
diff --git a/test/pending/neg/t1038.scala b/test/pending/neg/t1038.scala
deleted file mode 100644
index 7157aafa06..0000000000
--- a/test/pending/neg/t1038.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-class X(x : Int)
-
-object Y {
- val a = new X
- import a._
- implicit val b : Int = 1
-}
diff --git a/test/pending/neg/t1845.scala b/test/pending/neg/t1845.scala
deleted file mode 100644
index cfb28aa03c..0000000000
--- a/test/pending/neg/t1845.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-// Compiling the attached code makes scalac give a NPE.
-
-import scala.util.parsing.combinator.syntactical.TokenParsers
-import scala.util.parsing.combinator.lexical.StdLexical
-import scala.util.parsing.syntax.StdTokens
-
-class MyTokenParsers extends TokenParsers {
- import lexical._
- type Tokens = StdTokens
- type Elem = lexical.Token
- val lexical = new StdLexical
-}
diff --git a/test/pending/neg/t2078.scala b/test/pending/neg/t2078.scala
deleted file mode 100644
index a697afc646..0000000000
--- a/test/pending/neg/t2078.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-class A[-S](y : S) {
- val f = new { val x = y }
-}
-
-object Test extends Application {
- val a = new A(1)
- val b = a : A[Nothing]
- b.f.x
-}
diff --git a/test/pending/neg/t2180.scala b/test/pending/neg/t2180.scala
deleted file mode 100644
index a8055bf77d..0000000000
--- a/test/pending/neg/t2180.scala
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-Given the following code (which is broken):
-
-class Mxml {
-
- private def processChildren( children:Seq[Any] ):List[Mxml] = {
-
- children.toList.flatMap ( e => {
-
- e match {
-
- case s:scala.collection.Traversable[_] => s case a => List(a)
-
- }
-
- })
-
- }
-
-}
-
-I get the following error:
-
-Mxml.scala:5: error: could not find implicit value for parameter bf:scala.collection.generic.BuilderFactory[Any,List[Mxml],Sequence[Any]].
-
- children.flatMap ( e => {
-
-I spent 4 hours failing before I figured out the problem. The return type was wrong. It should have been List[Any].
-
-I have seen similar errors with map. My solution in the past has been to change it to a foldLeft because I have never been able to determine how to fix the problem until now.