diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/pending/pos | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/pending/pos')
-rw-r--r-- | test/pending/pos/misc/B.scala | 2 | ||||
-rw-r--r-- | test/pending/pos/no-widen-locals.scala | 2 | ||||
-rw-r--r-- | test/pending/pos/sig/sigs.scala | 2 | ||||
-rw-r--r-- | test/pending/pos/t0621.scala | 2 | ||||
-rw-r--r-- | test/pending/pos/t1357.scala | 2 | ||||
-rw-r--r-- | test/pending/pos/t1380/hallo.scala | 2 | ||||
-rw-r--r-- | test/pending/pos/t1786.scala | 4 | ||||
-rw-r--r-- | test/pending/pos/t2173.scala | 6 | ||||
-rw-r--r-- | test/pending/pos/t4606.scala | 6 | ||||
-rw-r--r-- | test/pending/pos/those-kinds-are-high.scala | 10 | ||||
-rw-r--r-- | test/pending/pos/unappgadteval.scala | 20 | ||||
-rw-r--r-- | test/pending/pos/virt.scala | 4 |
12 files changed, 31 insertions, 31 deletions
diff --git a/test/pending/pos/misc/B.scala b/test/pending/pos/misc/B.scala index 3a080e4712..afc30944f5 100644 --- a/test/pending/pos/misc/B.scala +++ b/test/pending/pos/misc/B.scala @@ -1,7 +1,7 @@ package test class B { - + def myA = new A() } diff --git a/test/pending/pos/no-widen-locals.scala b/test/pending/pos/no-widen-locals.scala index ba568f64eb..013e63f0a2 100644 --- a/test/pending/pos/no-widen-locals.scala +++ b/test/pending/pos/no-widen-locals.scala @@ -8,7 +8,7 @@ object Test { val X2 = 10 val X3 = 15 val X4 = 20 - + (x: @switch) match { case X1 => 1 case X2 => 2 diff --git a/test/pending/pos/sig/sigs.scala b/test/pending/pos/sig/sigs.scala index 72a293d0e6..bdb72a09bb 100644 --- a/test/pending/pos/sig/sigs.scala +++ b/test/pending/pos/sig/sigs.scala @@ -1,5 +1,5 @@ package test -class T { +class T { def foo[T <: String](x: T): T = x def bar[T](x: T): T = x class Inner { diff --git a/test/pending/pos/t0621.scala b/test/pending/pos/t0621.scala index d178bed0fb..1d2531c4bd 100644 --- a/test/pending/pos/t0621.scala +++ b/test/pending/pos/t0621.scala @@ -1,7 +1,7 @@ object Test { val x1 : List[T] forSome { type T } = List(42) val w1 = x1 match { case y : List[u] => ((z : u) => z)(y.head) } - + val x2 : T forSome { type T } = 42 val w2 = x2 match { case y : u => ((z : u) => z)(y) } } diff --git a/test/pending/pos/t1357.scala b/test/pending/pos/t1357.scala index fcdecb3ad3..7bc6d45034 100644 --- a/test/pending/pos/t1357.scala +++ b/test/pending/pos/t1357.scala @@ -6,7 +6,7 @@ object NonEmptyCons { object Main { type BT[+H, +T <: Tuple2[Tuple2[H, T], Tuple2[H, T]]] = Tuple2[H, T] - + // type T = Tuple2[String,String] type BinaryTree[+E] = BT[E, T forSome { type T <: Tuple2[BT[E, T], BT[E, T]] }] diff --git a/test/pending/pos/t1380/hallo.scala b/test/pending/pos/t1380/hallo.scala index 27ecd9fb8b..bb8fff2333 100644 --- a/test/pending/pos/t1380/hallo.scala +++ b/test/pending/pos/t1380/hallo.scala @@ -1,3 +1,3 @@ object hallo { - def main(args:Array[String]) = println("hallo") + def main(args:Array[String]) = println("hallo") } diff --git a/test/pending/pos/t1786.scala b/test/pending/pos/t1786.scala index d0cf8c7bac..dca2edaab4 100644 --- a/test/pending/pos/t1786.scala +++ b/test/pending/pos/t1786.scala @@ -1,10 +1,10 @@ /** This a consequence of the current type checking algorithm, where bounds * are checked only after variables are instantiated. I believe this will change once we go to contraint-based type inference. Assigning low priority until then. - * + * * */ class SomeClass(val intValue:Int) -class MyClass[T <: SomeClass](val myValue:T) +class MyClass[T <: SomeClass](val myValue:T) object Test extends Application { def myMethod(i:MyClass[_]) { diff --git a/test/pending/pos/t2173.scala b/test/pending/pos/t2173.scala index bbcca39826..cf1913d88b 100644 --- a/test/pending/pos/t2173.scala +++ b/test/pending/pos/t2173.scala @@ -4,9 +4,9 @@ class A[+U >: Null] { } // with the following error: -// +// // type arguments [A.this.R[X]] do not conform to class A's type parameter bounds [+U >: Null] -// +// // However, because type R[+X>:Null] is identical to X, it should carry X bounds and R[X] lower bound should be known to be X's lower bound, i.e. Null. -// +// // The same problem occurs with upper bounds. diff --git a/test/pending/pos/t4606.scala b/test/pending/pos/t4606.scala index f79d17d436..f4e5058483 100644 --- a/test/pending/pos/t4606.scala +++ b/test/pending/pos/t4606.scala @@ -1,9 +1,9 @@ object t4606 { class A(var x: Int) class B(x: Int) extends A(x) - trait C { self: B => - def foo = x - def bar = self.x + trait C { self: B => + def foo = x + def bar = self.x def baz = { val b: B = self b.x diff --git a/test/pending/pos/those-kinds-are-high.scala b/test/pending/pos/those-kinds-are-high.scala index d3ee2bf308..3012e72d7e 100644 --- a/test/pending/pos/those-kinds-are-high.scala +++ b/test/pending/pos/those-kinds-are-high.scala @@ -4,18 +4,18 @@ class A { class C1[T] extends Template[C1] with Container[T] class C2[T] extends Template[C2] with Container[T] - + /** Target expression: * List(new C1[String], new C2[String]) */ - + // Here's what would ideally be inferred. // // scala> :type List[Template[Container] with Container[String]](new C1[String], new C2[String]) // List[Template[Container] with Container[java.lang.String]] // // Here's what it does infer. - // + // // scala> :type List(new C1[String], new C2[String]) // <console>:8: error: type mismatch; // found : C1[String] @@ -27,11 +27,11 @@ class A { // // List[Container[String] with Template[Container[Any] with Template[Container[Any] with Template[Any]]] // - + /** Working version explicitly typed. */ def fExplicit = List[Template[Container] with Container[String]](new C1[String], new C2[String]) - + // nope // def fFail = List(new C1[String], new C2[String]) } diff --git a/test/pending/pos/unappgadteval.scala b/test/pending/pos/unappgadteval.scala index fce54723a1..89f6cabc43 100644 --- a/test/pending/pos/unappgadteval.scala +++ b/test/pending/pos/unappgadteval.scala @@ -21,30 +21,30 @@ object Suc { def unapply(a: Suc) = true } class Suc() extends Term[Int => Int] // Environments : -abstract class Env { +abstract class Env { def apply[a](v: Var[a]): a def extend[a](v: Var[a], x : a) = new Env { - def apply[b](w: Var[b]): b = w match { + def apply[b](w: Var[b]): b = w match { case _ : v.type => x // v eq w, hence a = b case _ => Env.this.apply(w) }} } -object empty extends Env { - def apply[a](x: Var[a]): a = throw new Error("not found : "+x.name) +object empty extends Env { + def apply[a](x: Var[a]): a = throw new Error("not found : "+x.name) } object Test { val v1 = new Var[util.Random]("random") val v2 = new Var[Int]("Int") val v3 = new Var[List[String]]("list") - + val anEnv = (empty .extend(v1, new util.Random) .extend(v2, 58) .extend(v3, Nil) ) - + def eval[a](t: Term[a], env : Env): a = t match { // First three work case v : Var[b] => env(v) // a = b @@ -54,9 +54,9 @@ object Test { // Next one fails like: // // found : (Int) => Int - // required: a + // required: a case i @ Suc() => { (y: Int) => y + 1 } // a = Int => Int - + // Next one fails like: // // error: '=>' expected but '[' found. @@ -64,11 +64,11 @@ object Test { // ^ case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c } - + val f1 = () => eval(v1, anEnv) val f2 = () => eval(v2, anEnv) val f3 = () => eval(v3, anEnv) - + def main(args: Array[String]): Unit = { println(f1()) println(f2()) diff --git a/test/pending/pos/virt.scala b/test/pending/pos/virt.scala index 6fe21246b0..99dcd747b2 100644 --- a/test/pending/pos/virt.scala +++ b/test/pending/pos/virt.scala @@ -1,9 +1,9 @@ object Virt extends Application { - class Foo { + class Foo { trait Inner <: { val x : Int = 3 } } - class Bar extends Foo { + class Bar extends Foo { trait Inner <: { val y : Int = x } } } |