aboutsummaryrefslogtreecommitdiff
path: root/tests/pending
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-01-27 11:13:54 +0100
committerMartin Odersky <odersky@gmail.com>2015-01-27 11:13:54 +0100
commit130e9a20755d512b47ca0fe41d8dfc3f6879cf86 (patch)
tree317f8224d85705d9951bc129d3e3ec9079895a4d /tests/pending
parenteb4d80891bcfaf9ffa402ea36f1562c5f597e479 (diff)
downloaddotty-130e9a20755d512b47ca0fe41d8dfc3f6879cf86.tar.gz
dotty-130e9a20755d512b47ca0fe41d8dfc3f6879cf86.tar.bz2
dotty-130e9a20755d512b47ca0fe41d8dfc3f6879cf86.zip
Use normnalized type to report type errors.
Without it, we get strange error messages like found: (implicit X)Y requred: Z when the problem is really that Y is not a subtype of Z.
Diffstat (limited to 'tests/pending')
-rw-r--r--tests/pending/pos/t3020.scala9
-rw-r--r--tests/pending/pos/t3037.scala13
-rw-r--r--tests/pending/pos/t304.scala5
-rw-r--r--tests/pending/pos/t3106.scala7
-rw-r--r--tests/pending/pos/t3137.scala17
-rw-r--r--tests/pending/pos/t3152.scala20
-rwxr-xr-xtests/pending/pos/t3174.scala14
-rw-r--r--tests/pending/pos/t3177.scala39
8 files changed, 0 insertions, 124 deletions
diff --git a/tests/pending/pos/t3020.scala b/tests/pending/pos/t3020.scala
deleted file mode 100644
index 016563e27..000000000
--- a/tests/pending/pos/t3020.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-object Test {
- def main(args: Array[String]): Unit = {
- var x = true
-
- ( { if (x) new scala.util.Random() } .asInstanceOf[Runnable] )
- }
-}
-
-
diff --git a/tests/pending/pos/t3037.scala b/tests/pending/pos/t3037.scala
deleted file mode 100644
index b71ffe041..000000000
--- a/tests/pending/pos/t3037.scala
+++ /dev/null
@@ -1,13 +0,0 @@
-package test
-
-object A {
- println(("a" match {
- case "a" => 1
- case _ => "a"
- }).asInstanceOf[Object])
- def foo[T](x: T) = x
- var x: Int = 1
- var y: Long = 1L
- x = foo(x)
- y = foo(y)
-}
diff --git a/tests/pending/pos/t304.scala b/tests/pending/pos/t304.scala
deleted file mode 100644
index 76da44157..000000000
--- a/tests/pending/pos/t304.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-object O {
- def f1 = -1;
- def f2 = 0-1;
- def f3 = -f1;
-}
diff --git a/tests/pending/pos/t3106.scala b/tests/pending/pos/t3106.scala
deleted file mode 100644
index a9591d0aa..000000000
--- a/tests/pending/pos/t3106.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-class Sample[A] (val d0: ((A,A)) => A) {}
-
-object Sample {
- implicit def apply[A] (x:A): Sample[A] = {
- new Sample(p => p._1)
- }
-}
diff --git a/tests/pending/pos/t3137.scala b/tests/pending/pos/t3137.scala
deleted file mode 100644
index cb7317af0..000000000
--- a/tests/pending/pos/t3137.scala
+++ /dev/null
@@ -1,17 +0,0 @@
-trait A {
- val C: Any
-}
-
-class B extends A {
- class C
- object C
-}
-
-trait AA {
- type C
- def C: Int => C
-}
-
-class BB extends AA {
- case class C(v: Int)
-}
diff --git a/tests/pending/pos/t3152.scala b/tests/pending/pos/t3152.scala
deleted file mode 100644
index 3d1dcbd6f..000000000
--- a/tests/pending/pos/t3152.scala
+++ /dev/null
@@ -1,20 +0,0 @@
-trait Applicative[M[_]]
-
-sealed trait MA[M[_], A] {
- def sequence[N[_], B](implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = sys.error("stub")
- // def sequence3[N[_], B]()(implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = sys.error("stub")
-}
-
-object test {
- implicit def ListMA[A](l: List[A]): MA[List, A] = sys.error("stub")
- implicit val ao: Applicative[Option] = sys.error("stub")
-
- /* This compiles OK:
- (Nil: List[Option[Int]]).sequence3(): Option[List[Int]]
- */
-
- // BUG: error: immutable is not an enclosing class
- // !!! No line number is reported with the error
- (Nil: List[Option[Int]]).sequence: Option[List[Int]]
- (List[Option[Int]]()).sequence: Option[List[Int]]
-}
diff --git a/tests/pending/pos/t3174.scala b/tests/pending/pos/t3174.scala
deleted file mode 100755
index 8d9b2578d..000000000
--- a/tests/pending/pos/t3174.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-object test {
- def method(): Unit = {
- class Foo extends AnyRef {
- object Color {
- object Blue
- }
-
- class Board {
- val grid = Color.Blue
- }
- }
- new Foo
- }
- }
diff --git a/tests/pending/pos/t3177.scala b/tests/pending/pos/t3177.scala
deleted file mode 100644
index 12dfce6ee..000000000
--- a/tests/pending/pos/t3177.scala
+++ /dev/null
@@ -1,39 +0,0 @@
-trait InvariantFunctor[F[_]] {
- def xmap[A, B](ma: F[A], f: A => B, g: B => A): F[B]
-}
-
-object InvariantFunctor {
- import Endo._
-
- implicit val EndoInvariantFunctor: InvariantFunctor[Endo] = new InvariantFunctor[Endo] {
- def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
- }
-
- // The definition about fails with:
- // anon-type.scala:9: error: not found: value b
- // def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
- // ^
- // anon-type.scala:8: error: not found: type $anon
- // implicit val EndoInvariantFunctor = new InvariantFunctor[Endo] {
- // ^
-
-
- // These both work:
- // implicit val EndoInvariantFunctorAscribed: InvariantFunctor[Endo] = new InvariantFunctor[Endo] {
- // def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
- // }
- //
- // implicit val EndoInvariantFunctorStubbed = new InvariantFunctor[Endo] {
- // def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = error("stub")
- // }
-}
-
-trait Endo[X]
-
-object Endo {
- implicit def EndoTo[A](f: A => A): Endo[A] = new Endo[A] {
- def apply(a: A) = f(a)
- }
-
- implicit def EndoFrom[A](e: Endo[A]): A => A = e.apply(_)
-}