diff options
Diffstat (limited to 'tests/pending/pos')
96 files changed, 12 insertions, 1305 deletions
diff --git a/tests/pending/pos/apply-equiv.scala b/tests/pending/pos/apply-equiv.scala deleted file mode 100644 index f53b8b5ab..000000000 --- a/tests/pending/pos/apply-equiv.scala +++ /dev/null @@ -1,14 +0,0 @@ -class Test { - - class Lambda { type Arg; type Apply } - - type T1 = (Lambda { type Arg = Int } { type Apply = List[Arg] }) # Apply - type T2 = List[Int] - - var x: T1 = _ - var y: T2 = _ - - x = y - y = x - -} diff --git a/tests/pending/pos/contraImplicits.scala b/tests/pending/pos/contraImplicits.scala deleted file mode 100644 index c4d659615..000000000 --- a/tests/pending/pos/contraImplicits.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.reflect._ -// this needs to be fleshed out further -class Contra[-T] - -object Test { - def getParam[T](c: Contra[T])(implicit ct: ClassTag[T]): Unit = { - println(ct) - ct - } - def f[T](x: Contra[T]): Contra[T] = x - - def main(args: Array[String]): Unit = { - val x = f(new Contra[Int]) - val y: Contra[Int] = x - getParam(new Contra[Int]) - } -} - diff --git a/tests/pending/pos/depmet_implicit_norm_ret.scala b/tests/pending/pos/depmet_implicit_norm_ret.scala index 85be750b4..42bfb9fe1 100644 --- a/tests/pending/pos/depmet_implicit_norm_ret.scala +++ b/tests/pending/pos/depmet_implicit_norm_ret.scala @@ -17,6 +17,8 @@ object Test{ } } + import ZipWith._ + trait ZipWith[S] { type T def zipWith : S => T = sys.error("") @@ -24,6 +26,9 @@ object Test{ // bug: inferred return type = (Stream[A]) => java.lang.Object with Test.ZipWith[B]{type T = Stream[B]}#T // this seems incompatible with vvvvvvvvvvvvvvvvvvvvvv -- #3731 - def map[A,B](f : A => B) /* : Stream[A] => Stream[B]*/ = ZipWith(f) - val tst: Stream[Int] = map{x: String => x.length}(Stream("a")) + def map1[A,B](f : A => B) = ZipWith(f)(SuccZipWith) // this typechecks but fails in -Ycheck:first + val tst1: Stream[Int] = map1[String, Int]{x: String => x.length}.apply(Stream("a")) + + def map2[A,B](f : A => B) = ZipWith(f) // this finds ZeroZipWith where scalac finds SuccZipWith and fails typechecking in the next line. + val tst2: Stream[Int] = map2{x: String => x.length}.apply(Stream("a")) } diff --git a/tests/pending/pos/depmet_implicit_oopsla_zipwith.scala b/tests/pending/pos/depmet_implicit_oopsla_zipwith.scala deleted file mode 100644 index 83171f865..000000000 --- a/tests/pending/pos/depmet_implicit_oopsla_zipwith.scala +++ /dev/null @@ -1,44 +0,0 @@ -case class Zero() -case class Succ[N](x: N) -import Stream.{cons, continually} - -trait ZipWith[N, S] { - type T - - def manyApp: N => Stream[S] => T - def zipWith: N => S => T = n => f => manyApp(n)(continually(f)) -} -object ZipWith { - implicit def ZeroZipWith[S]: ZipWith[Zero,S]{type T = Stream[S]} = new ZipWith[Zero, S] { - type T = Stream[S] - - def manyApp = n => xs => xs - } - - implicit def SuccZipWith[N, S, R](implicit zw: ZipWith[N, R]): ZipWith[Succ[N],S => R]{type T = Stream[S] => zw.T; def zapp[A, B](xs: Stream[A => B],ys: Stream[A]): Stream[B]} = - new ZipWith[Succ[N],S => R] { - type T = Stream[S] => zw.T - - def zapp[A, B](xs: Stream[A => B], ys: Stream[A]): Stream[B] = (xs, ys) match { - case (cons(f, fs), cons(s, ss)) => cons(f(s),zapp(fs, ss)) - case (_, _) => Stream.empty - } - - def manyApp = n => xs => ss => n match { - case Succ(i) => zw.manyApp(i)(zapp(xs, ss)) - } - } -} - -object Test { - def zWith[N, S](n: N, s: S)(implicit zw: ZipWith[N, S]): zw.T = zw.zipWith(n)(s) - - def zipWith0: Stream[Int] = zWith(Zero(),0) - -// (Stream[A]) => java.lang.Object with ZipWith[Zero,B]{type T = Stream[B]}#T -// should normalise to: Stream[A] => Stream[B] - def map[A, B](f: A => B) = zWith(Succ(Zero()),f) - - def zipWith3[A, B, C, D](f: A => B => C => D) = //: Stream[A] => Stream[B] => Stream[C] => Stream[D] = // BUG why do we need a return type? - zWith(Succ(Succ(Succ(Zero()))),f) -} diff --git a/tests/pending/pos/depsel.scala b/tests/pending/pos/depsel.scala deleted file mode 100644 index 2cec4349e..000000000 --- a/tests/pending/pos/depsel.scala +++ /dev/null @@ -1,14 +0,0 @@ -// demonstrates selection on non-path types. Needs to be fleshed out to -// become a real test. -object Test { - - class C { - type T - val f: T => T = ??? - } - - var x = new C - val y = x.f - - -} diff --git a/tests/pending/pos/exponential-spec.scala b/tests/pending/pos/exponential-spec.scala index 54515c1d2..26c9ab85e 100644 --- a/tests/pending/pos/exponential-spec.scala +++ b/tests/pending/pos/exponential-spec.scala @@ -23,7 +23,7 @@ object Test { compose f[T] // 8s compose f[T] // 11s compose f[T] // 17s - compose f[T] // 29s +/* compose f[T] // 29s compose f[T] // 54s compose f[T] compose f[T] @@ -42,6 +42,6 @@ object Test { compose f[T] compose f[T] compose f[T] - compose f[T] + compose f[T]*/ )(exp) } diff --git a/tests/pending/pos/extractor-types.scala b/tests/pending/pos/extractor-types.scala deleted file mode 100644 index 200279be6..000000000 --- a/tests/pending/pos/extractor-types.scala +++ /dev/null @@ -1,30 +0,0 @@ -package p1 { - object Ex { def unapply(p: Any): Option[_ <: Int] = null } - object Foo { val Ex(_) = null } -} -// a.scala:2: error: error during expansion of this match (this is a scalac bug). -// The underlying error was: type mismatch; -// found : Some[_$1(in value x$1)] where type _$1(in value x$1) -// required: Some[_$1(in method unapply)] -// object Foo { val Ex(_) = null } -// ^ -// one error found - -package p2 { - trait Other { - class Quux - object Baz { def unapply(x: Any): Option[Quux] = None } - } - trait Reifiers { - def f(): Unit = { - val u2: Other = null - (null: Any) match { case u2.Baz(x) => println(x) } //: u2.Quux) } - // The underlying error was: type mismatch; - // found : Other#Quux - // required: u2.Quux - // x match { case u2.Baz(x) => println(x: u2.Quux) } - // ^ - // one error found - } - } -} diff --git a/tests/pending/pos/gadts2.scala b/tests/pending/pos/gadts2.scala deleted file mode 100644 index b67bafb32..000000000 --- a/tests/pending/pos/gadts2.scala +++ /dev/null @@ -1,25 +0,0 @@ -object Test { - - abstract class Number - case class MyInt(n: Int) extends Number - case class MyDouble(d: Double) extends Number - - trait Term[a] - case class Cell[a](var x: a) extends Term[a] - final case class NumTerm(val n: Number) extends Term[Number] - - def f[a](t: Term[a], c: Cell[a]): Unit = { - t match { - case NumTerm(n) => c.x = MyDouble(1.0) - } - } - - val x: Term[Number] = NumTerm(MyInt(5)) - - def main(args: Array[String]): Unit = { - val cell = Cell[Number](MyInt(6)) - Console.println(cell) - f[Number](new NumTerm(MyInt(5)), cell) - Console.println(cell) - } -} diff --git a/tests/pending/pos/generic-sigs.flags b/tests/pending/pos/generic-sigs.flags deleted file mode 100644 index e8fb65d50..000000000 --- a/tests/pending/pos/generic-sigs.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/tests/pending/pos/hk-infer.scala b/tests/pending/pos/hk-infer.scala deleted file mode 100644 index c23a9d151..000000000 --- a/tests/pending/pos/hk-infer.scala +++ /dev/null @@ -1,37 +0,0 @@ -object Basis { - final case class X[T](t: T) - val x = Seq(X(32)) - val y = Seq(X(true)) - val x1 = Seq(X("asdf")) - val x2 = Seq(X('d')) -} -import Basis._ - -object DoesWork { - // Doesn'tWork - // def f1 = x ++ y ++ x1 ++ x2 - - def f2 = List(x, y, x1, x2).flatten -} - -// Testing the not giving of explicit Booper[M] arguments. -object ShouldWorkHK { - class Booper[M[_]](xs: Seq[M[_]]) extends collection.generic.SeqForwarder[M[_]] { - def underlying = xs - def BOOP(ys: Seq[M[_]]) = new Booper(xs ++ ys) - } - implicit def mkBoop[M[_]](xs: Seq[M[_]]): ShouldWorkHK.Booper[M] = new Booper(xs) - - def f1 = x BOOP y BOOP x1 BOOP x2 -} - -object DoesWorkHK { - class Booper[M[_]](xs: Seq[M[_]]) extends collection.generic.SeqForwarder[M[_]] { - def underlying = xs - def BOOP(ys: Seq[M[_]]) = new Booper[M](xs ++ ys) - } - implicit def mkBoop[M[_]](xs: Seq[M[_]]): DoesWorkHK.Booper[M] = new Booper[M](xs) - - def f1 = x BOOP y BOOP x1 BOOP x2 -} - diff --git a/tests/pending/pos/i743.scala b/tests/pending/pos/i743.scala deleted file mode 100644 index 8fe522cee..000000000 --- a/tests/pending/pos/i743.scala +++ /dev/null @@ -1,6 +0,0 @@ -object NonLocalReturn { - def foo(a: List[Int]): Int = { - a.foreach(x => return x) - 0 - } -} diff --git a/tests/pending/pos/infersingle.flags b/tests/pending/pos/infersingle.flags deleted file mode 100644 index e1b37447c..000000000 --- a/tests/pending/pos/infersingle.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental
\ No newline at end of file diff --git a/tests/pending/pos/infersingle.scala b/tests/pending/pos/infersingle.scala deleted file mode 100644 index 60f4ff07e..000000000 --- a/tests/pending/pos/infersingle.scala +++ /dev/null @@ -1,52 +0,0 @@ -object Test1 { - def one[T](x: T): Option[T] = Some(x) - val x = "one" - val y: Option[x.type] = one(x) -} - -object Test2 { - // Has never worked, but seems desirable given the recent changes to - // pattern type inference. - val a = "" - object Id { - def unapply(xxxx: Any): Some[a.type] = Some[a.type](a) - } - val b: a.type = (a: a.type) match { - case Id(x) => x - } -} - -object Test3 { - val a = "" - object Id { - def unapply(xxxx: Any): Some[Test3.type] = Some[Test3.type](Test3) - } - val b: Test3.type = a match { - case Id(x) => x - } -} - -class Test4 { - val a = "" - object Id { - def unapply(xxxx: Any): Some[Test4.this.type] = Some[Test4.this.type](Test4.this) - } - val b: Test4.this.type = a match { - case Id(x) => x - } -} - -class Super5 { - final val q = "" - def q1: q.type = q -} - -class Test5 extends Super5 { - val a = "" - object Id { - def unapply(xxxx: Any): Some[Test5.super.q.type] = Some[Test5.super.q.type](q1) - } - val b: Test5.super.q.type = a match { - case Id(x) => x - } -} diff --git a/tests/pending/pos/isApplicableSafe.scala b/tests/pending/pos/isApplicableSafe.scala deleted file mode 100644 index b4cacbf28..000000000 --- a/tests/pending/pos/isApplicableSafe.scala +++ /dev/null @@ -1,8 +0,0 @@ -class A { - // Any of Array[List[Symbol]], List[Array[Symbol]], or List[List[Symbol]] compile. - var xs: Array[Array[Symbol]] = _ - var ys: Array[Map[Symbol, Set[Symbol]]] = _ - - xs = Array(Array()) - ys = Array(Map(), Map()) -} diff --git a/tests/pending/pos/lazyvals.scala b/tests/pending/pos/lazyvals.scala deleted file mode 100644 index 93a82cd0c..000000000 --- a/tests/pending/pos/lazyvals.scala +++ /dev/null @@ -1,18 +0,0 @@ - - -trait Iterator { - - def span() = { - val self: Int = 33 - class Leading { - def finish(): Unit = println("finished") - } - val leading = new Leading - - class Trailing { - @volatile lazy val it = leading.finish() - } - val trailing = new Trailing - (leading, trailing) - } -} diff --git a/tests/pending/pos/matthias4.scala b/tests/pending/pos/matthias4.scala deleted file mode 100644 index 18599ae71..000000000 --- a/tests/pending/pos/matthias4.scala +++ /dev/null @@ -1,84 +0,0 @@ -/* -object A requires B { - B.X getX() { - return B.getX(); - } - void setX(B.X x) {} -} -object B { - class X {} - X getX() { - return new X(); - } - void setX(X x) {} -} -object C requires B { - object A; - void test() { - A.setX(B.getX()); - } -} -*/ - -trait _a extends AnyRef with _b { - val a: _a; - val A: A; - type A <: a.AObject; - trait AObject { - def getX(): B.X; - def setX(x: B.X): Unit; - } -} -trait a123 extends AnyRef with _a with _b { - val a: this.type = this; - val A: A = new A(); - class A() extends AObject { - def getX(): B.X = B.getX(); - def setX(x: B.X) = B.setX(x); - } -} - -trait _b { - val b: _b; - val B: B; - type B <: b.BObject; - trait BObject { - type X; - def getX(): X; - def setX(x: X): Unit; - } -} -abstract class b() extends AnyRef with _b { - val b: this.type = this; - val B: B = new B(); - class B() extends BObject { - class X() {} - def getX(): X = new X(); - def setX(x: X) = (); - } -} - -trait _m { - val m: _m; - val M: M; - type M <: m.MObject; - trait MObject {} -} -abstract class m() extends AnyRef with _m with _b { - val m: this.type = this; - val M: M = new M(); - class M() extends MObject with a123 with Linker { - def test() = { - val x: B.X = B.getX(); - A.setX(x); - } - } - trait Linker { - val b: m.this.b.type = m.this.b; - val B: m.this.B.type = m.this.B; - type B = m.this.B; - val m: m.this.m.type = m.this.m; - val M: m.this.M.type = m.this.M; - type M = m.this.M; - } -} diff --git a/tests/pending/pos/mixins.scala b/tests/pending/pos/mixins.scala deleted file mode 100644 index 846d6a41b..000000000 --- a/tests/pending/pos/mixins.scala +++ /dev/null @@ -1,22 +0,0 @@ -package mixins -abstract class Super { - def foo: Int -} -trait Mixin extends Super { - abstract override def foo = super.foo -} -trait MixinSub extends Super with Mixin { - abstract override def foo: Int = super.foo -} -trait MixinSubSub extends MixinSub { - abstract override def foo = super.foo -} -class Sub extends Super { - def foo: Int = 1 -} -class Base extends Sub with MixinSubSub { - override def foo = super.foo -} -trait Mixin1 extends Sub with MixinSubSub {} -class Base1 extends Mixin1 {} - diff --git a/tests/pending/pos/return_thistype.scala b/tests/pending/pos/return_thistype.scala deleted file mode 100644 index c0736c0ad..000000000 --- a/tests/pending/pos/return_thistype.scala +++ /dev/null @@ -1,8 +0,0 @@ -// tests transformation of return type in typedTypeApply (see also tcpoly_gm.scala) -class As { - class A { - def foo: A.this.type = bar.asInstanceOf[A.this.type] - def foo2: this.type = bar.asInstanceOf[this.type] - def bar: A = null - } -} diff --git a/tests/pending/pos/setter-not-implicit.scala b/tests/pending/pos/setter-not-implicit.scala deleted file mode 100644 index 9bfffc2ce..000000000 --- a/tests/pending/pos/setter-not-implicit.scala +++ /dev/null @@ -1,3 +0,0 @@ -object O { - implicit var x: Int = 0 -} diff --git a/tests/pending/pos/stable.scala b/tests/pending/pos/stable.scala deleted file mode 100644 index 267a36fe5..000000000 --- a/tests/pending/pos/stable.scala +++ /dev/null @@ -1,11 +0,0 @@ -trait Base { - val x: Int; - val y: Int; - var z: Int; -} - -class Sub() extends Base { - val x: Int = 1; - val y: Int = 2; - var z: Int = 3; -} diff --git a/tests/pending/pos/t1756.scala b/tests/pending/pos/t1756.scala deleted file mode 100644 index 34bf273ab..000000000 --- a/tests/pending/pos/t1756.scala +++ /dev/null @@ -1,59 +0,0 @@ - -/** -This is a tricky issue which has to do with the fact that too much conflicting -type information is propagated into a single implicit search, where the intended -solution applies two implicit searches. - -Roughly, in x + x * y, the first x is first typed as Poly[A]. That -means the x * y is then typed as Poly[A]. Then the second x is typed -as Poly[A], then y is typed as Poly[Poly[A]]. The application x * y -fails, so the coef2poly implicit conversion is applied to x. That -means we look for an implicit conversion from type Poly[A] to type -?{val *(x$1: ?>: Poly[Poly[A]] <: Any): Poly[A]}. Note that the result -type Poly[A] is propagated into the implicit search. Poly[A] comes as -expected type from x+, because the lhs x is still typed as a Poly[A]. -This means that the argument of the implicit conversion is typechecked -with expected type A with Poly[A]. And no solution is found. - -To solve this, I added a fallback scheme similar to implicit arguments: -When an implicit view that adds a method matching given arguments and result -type fails, try again without the result type. - -However, troubles are not yet over. We now get an oprhan poly param C when pickling -and, if typr printer and -Ylog:front is on, an infinite type of the form - - mu x. Ring[LazyRef(x) & A] -*/ -trait Ring[T <: Ring[T]] { - def +(that: T): T - def *(that: T): T -} - -class A extends Ring[A] { - def +(that: A) = new A - def *(that: A) = new A -} - -class Poly[C <: Ring[C]](val c: C) extends Ring[Poly[C]] { - def +(that: Poly[C]) = new Poly(this.c + that.c) - def *(that: Poly[C]) = new Poly(this.c*that.c) -} - -object Test extends App { - - implicit def coef2poly[C <: Ring[C]](c: C): Poly[C] = new Poly(c) - - val a = new A - val x = new Poly(new A) - - println(x + a) // works - println(a + x) // works - - val y = new Poly(new Poly(new A)) - - println(x + y*x) // works - println(x*y + x) // works - println(y*x + x) // works - - println(x + x*y) // failed before -} diff --git a/tests/pending/pos/t3494.scala b/tests/pending/pos/t3494.scala deleted file mode 100644 index dd54b0f82..000000000 --- a/tests/pending/pos/t3494.scala +++ /dev/null @@ -1,7 +0,0 @@ -object Test { - def f[T](xs: T*) = () - - val x = "abc" - - f[x.type](x) -} diff --git a/tests/pending/pos/t3631.scala b/tests/pending/pos/t3631.scala index e72374130..207e28cd7 100644 --- a/tests/pending/pos/t3631.scala +++ b/tests/pending/pos/t3631.scala @@ -1,3 +1,4 @@ +// fails Ycheck case class X22(x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int, x22: Int) { } case class X23(x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int, x22: Int, x23: Int) { } diff --git a/tests/pending/pos/t3800.scala b/tests/pending/pos/t3800.scala deleted file mode 100644 index 096502174..000000000 --- a/tests/pending/pos/t3800.scala +++ /dev/null @@ -1,6 +0,0 @@ -class meh extends annotation.StaticAnnotation - -class ALike[C] -abstract class AFactory[CC[x] <: ALike[CC[x]]] { - def aCompanion : AFactory[CC @meh] -} diff --git a/tests/pending/pos/t3862.scala b/tests/pending/pos/t3862.scala deleted file mode 100644 index 0d978caa4..000000000 --- a/tests/pending/pos/t3862.scala +++ /dev/null @@ -1,10 +0,0 @@ -// Currently takes a very long time (more than a minute) and then -// does not find an alternative. -object OverloadingShapeType { - // comment out this, and the other alternative is chosen. - def blerg(f: String): Unit = {} - - def blerg[M[X], T](l: M[T]): Unit = {} - - blerg(List(1)) // error: type mismatch; found : List[Int] required: String -} diff --git a/tests/pending/pos/t3880.scala b/tests/pending/pos/t3880.scala deleted file mode 100644 index f778eb71a..000000000 --- a/tests/pending/pos/t3880.scala +++ /dev/null @@ -1,16 +0,0 @@ -abstract class Bar[+B] { -} -abstract class C1[+B] extends Bar[B] { - private[this] def g(x: C1[B]): Unit = () - - // this method is fine: notice that it allows the call to g, - // which requires C1[B], even though we matched on C1[_]. - // (That is good news.) - private[this] def f1(x: Bar[B]): Unit = x match { - case x: C1[_] => g(x) - } - // this one crashes. - private[this] def f2(x: Bar[B]): Unit = x match { - case x: C1[_] => f2(x) - } -} diff --git a/tests/pending/pos/t3960.flags b/tests/pending/pos/t3960.flags deleted file mode 100644 index 4449dbbdf..000000000 --- a/tests/pending/pos/t3960.flags +++ /dev/null @@ -1 +0,0 @@ --Ycheck:typer
\ No newline at end of file diff --git a/tests/pending/pos/t3999/a_1.scala b/tests/pending/pos/t3999/a_1.scala deleted file mode 100644 index be9cc371e..000000000 --- a/tests/pending/pos/t3999/a_1.scala +++ /dev/null @@ -1,9 +0,0 @@ -package foo - -class Outside - -package object bar { - class Val(b: Boolean) - implicit def boolean2Val(b: Boolean): foo.bar.package.Val = new Val(b) - implicit def boolean2Outside(b: Boolean): foo.Outside = new Outside -} diff --git a/tests/pending/pos/t3999/b_2.scala b/tests/pending/pos/t3999/b_2.scala deleted file mode 100644 index 775b839d9..000000000 --- a/tests/pending/pos/t3999/b_2.scala +++ /dev/null @@ -1,7 +0,0 @@ -package foo -package bar - -class A { - val s: Val = false - val o: Outside = false -} diff --git a/tests/pending/pos/t3999b.scala b/tests/pending/pos/t3999b.scala deleted file mode 100644 index 0f3f7d642..000000000 --- a/tests/pending/pos/t3999b.scala +++ /dev/null @@ -1,20 +0,0 @@ -object `package` { - trait Score { def toString : String } - trait Test[+T <: Score] { def apply(s : String) : T } - - case class FT(f : Float) extends Score - implicit object FT extends Test[FT] { def apply(s : String) : FT = new FT(s.toFloat) } - - case class IT(i : Int) extends Score - implicit object IT extends Test[IT] { def apply(s : String) : IT = new IT(s.toInt) } -} - -class TT[+T <: Score](implicit val tb : Test[T]) { - def read(s : String) : T = tb(s) -} - -object Tester { - val tt = new TT[FT] - val r = tt.read("1.0") - r.toString -} diff --git a/tests/pending/pos/t4188.scala b/tests/pending/pos/t4188.scala index 40e7d4924..104473fc5 100644 --- a/tests/pending/pos/t4188.scala +++ b/tests/pending/pos/t4188.scala @@ -1,3 +1,4 @@ +// Fails Ycheck class A { object Ding class B { diff --git a/tests/pending/pos/t4269.scala b/tests/pending/pos/t4269.scala deleted file mode 100644 index fe0c20103..000000000 --- a/tests/pending/pos/t4269.scala +++ /dev/null @@ -1,5 +0,0 @@ -class A { - PartialFunction.condOpt(Nil) { - case items@List(_: _*) if true => - } -} diff --git a/tests/pending/pos/t4579.flags b/tests/pending/pos/t4579.flags deleted file mode 100644 index 1182725e8..000000000 --- a/tests/pending/pos/t4579.flags +++ /dev/null @@ -1 +0,0 @@ --optimize
\ No newline at end of file diff --git a/tests/pending/pos/t4911.flags b/tests/pending/pos/t4911.flags deleted file mode 100644 index 779916d58..000000000 --- a/tests/pending/pos/t4911.flags +++ /dev/null @@ -1 +0,0 @@ --unchecked -Xfatal-warnings
\ No newline at end of file diff --git a/tests/pending/pos/t5029.flags b/tests/pending/pos/t5029.flags deleted file mode 100644 index e8fb65d50..000000000 --- a/tests/pending/pos/t5029.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/tests/pending/pos/t5330.scala b/tests/pending/pos/t5330.scala deleted file mode 100644 index 24aab7733..000000000 --- a/tests/pending/pos/t5330.scala +++ /dev/null @@ -1,22 +0,0 @@ -trait FM[A] { - def map(f: A => Any): Unit -} - -trait M[A] extends FM[A] { - def map(f: A => Any): Unit -} - -trait N[A] extends FM[A] - -object test { - def kaboom(xs: M[_]) = xs map (x => ()) // missing parameter type. - - def okay1[A](xs: M[A]) = xs map (x => ()) - def okay2(xs: FM[_]) = xs map (x => ()) - def okay3(xs: N[_]) = xs map (x => ()) -} - -class CC2(xs: List[_]) { - def f(x1: Any, x2: Any) = null - def g = xs map (x => f(x, x)) -} diff --git a/tests/pending/pos/t5604/ReplConfig.scala b/tests/pending/pos/t5604/ReplConfig.scala deleted file mode 100644 index 8c589eba6..000000000 --- a/tests/pending/pos/t5604/ReplConfig.scala +++ /dev/null @@ -1,53 +0,0 @@ -/* NSC -- new Scala compiler - * Copyright 2005-2011 LAMP/EPFL - * @author Paul Phillips - */ - -package scala.tools.nsc -package interpreter - -import util.Exceptional.unwrap -import util.stackTraceString - -trait ReplConfig { - lazy val replProps = new ReplProps - - class TapMaker[T](x: T) { - def tapInfo(msg: => String): T = tap(x => replinfo(parens(x))) - def tapDebug(msg: => String): T = tap(x => repldbg(parens(x))) - def tapTrace(msg: => String): T = tap(x => repltrace(parens(x))) - def tap[U](f: T => U): T = { - f(x) - x - } - } - - private def parens(x: Any) = "(" + x + ")" - private def echo(msg: => String) = - try Console println msg - catch { case x: AssertionError => Console.println("Assertion error printing debugging output: " + x) } - - private[nsc] def repldbg(msg: => String) = if (isReplDebug) echo(msg) - private[nsc] def repltrace(msg: => String) = if (isReplTrace) echo(msg) - private[nsc] def replinfo(msg: => String) = if (isReplInfo) echo(msg) - - private[nsc] def logAndDiscard[T](label: String, alt: => T): PartialFunction[Throwable, T] = { - case t => - repldbg(label + ": " + unwrap(t)) - repltrace(stackTraceString(unwrap(t))) - alt - } - private[nsc] def substituteAndLog[T](alt: => T)(body: => T): T = - substituteAndLog("" + alt, alt)(body) - private[nsc] def substituteAndLog[T](label: String, alt: => T)(body: => T): T = { - try body - catch logAndDiscard(label, alt) - } - private[nsc] def squashAndLog(label: String)(body: => Unit): Unit = - substituteAndLog(label, ())(body) - - def isReplTrace: Boolean = replProps.trace - def isReplDebug: Boolean = replProps.debug || isReplTrace - def isReplInfo: Boolean = replProps.info || isReplDebug - def isReplPower: Boolean = replProps.power -} diff --git a/tests/pending/pos/t5604/ReplReporter.scala b/tests/pending/pos/t5604/ReplReporter.scala deleted file mode 100644 index 9423efd8a..000000000 --- a/tests/pending/pos/t5604/ReplReporter.scala +++ /dev/null @@ -1,30 +0,0 @@ -/* NSC -- new Scala compiler - * Copyright 2002-2011 LAMP/EPFL - * @author Paul Phillips - */ - -package scala.tools.nsc -package interpreter - -import reporters._ -import IMain._ - -class ReplReporter(intp: IMain) extends ConsoleReporter(intp.settings, Console.in, new ReplStrippingWriter(intp)) { - override def printMessage(msg: String): Unit = { - // Avoiding deadlock if the compiler starts logging before - // the lazy val is complete. - if (intp.isInitializeComplete) { - if (intp.totalSilence) { - if (isReplTrace) - super.printMessage("[silent] " + msg) - } - else super.printMessage(msg) - } - else Console.println("[init] " + msg) - } - - override def displayPrompt(): Unit = { - if (intp.totalSilence) () - else super.displayPrompt() - } -} diff --git a/tests/pending/pos/t5604b/T_1.scala b/tests/pending/pos/t5604b/T_1.scala deleted file mode 100644 index 179dcb10c..000000000 --- a/tests/pending/pos/t5604b/T_1.scala +++ /dev/null @@ -1,6 +0,0 @@ -// sandbox/t5604/T.scala -package t6504 - -trait T { - def foo: Boolean = false -} diff --git a/tests/pending/pos/t5604b/T_2.scala b/tests/pending/pos/t5604b/T_2.scala deleted file mode 100644 index 179dcb10c..000000000 --- a/tests/pending/pos/t5604b/T_2.scala +++ /dev/null @@ -1,6 +0,0 @@ -// sandbox/t5604/T.scala -package t6504 - -trait T { - def foo: Boolean = false -} diff --git a/tests/pending/pos/t5604b/Test_1.scala b/tests/pending/pos/t5604b/Test_1.scala deleted file mode 100644 index f7c58ebe8..000000000 --- a/tests/pending/pos/t5604b/Test_1.scala +++ /dev/null @@ -1,7 +0,0 @@ -// sandbox/t5604/Test.scala -package t6504 - -object Test { - def blerg1(a: Any): Any = if (foo) blerg1(0) - def blerg2(a: Any): Any = if (t6504.foo) blerg2(0) -} diff --git a/tests/pending/pos/t5604b/Test_2.scala b/tests/pending/pos/t5604b/Test_2.scala deleted file mode 100644 index f7c58ebe8..000000000 --- a/tests/pending/pos/t5604b/Test_2.scala +++ /dev/null @@ -1,7 +0,0 @@ -// sandbox/t5604/Test.scala -package t6504 - -object Test { - def blerg1(a: Any): Any = if (foo) blerg1(0) - def blerg2(a: Any): Any = if (t6504.foo) blerg2(0) -} diff --git a/tests/pending/pos/t5604b/pack_1.scala b/tests/pending/pos/t5604b/pack_1.scala deleted file mode 100644 index f50d568bf..000000000 --- a/tests/pending/pos/t5604b/pack_1.scala +++ /dev/null @@ -1,5 +0,0 @@ -// sandbox/t5604/pack.scala -package t6504 - -object `package` extends T { -} diff --git a/tests/pending/pos/t5726.scala b/tests/pending/pos/t5726.scala deleted file mode 100644 index 1ef14ac79..000000000 --- a/tests/pending/pos/t5726.scala +++ /dev/null @@ -1,17 +0,0 @@ -import scala.language.dynamics - -class DynamicTest extends Dynamic { - def selectDynamic(name: String) = s"value of $name" - def updateDynamic(name: String)(value: Any): Unit = { - println(s"You have just updated property '$name' with value: $value") - } -} - -object MyApp extends App { - def testing(): Unit = { - val test = new DynamicTest - test.firstName = "John" - } - - testing() -} diff --git a/tests/pending/pos/t5769.scala b/tests/pending/pos/t5769.scala deleted file mode 100644 index d7ec23a56..000000000 --- a/tests/pending/pos/t5769.scala +++ /dev/null @@ -1,9 +0,0 @@ -// a.scala -import scala.reflect.{ClassTag, classTag} - -class A { - type AI = Array[Int] - - def f1 = classTag[Array[Int]] - def f2 = classTag[AI] -} diff --git a/tests/pending/pos/t578.scala b/tests/pending/pos/t578.scala deleted file mode 100644 index 6f95dd8ce..000000000 --- a/tests/pending/pos/t578.scala +++ /dev/null @@ -1,7 +0,0 @@ -object Test { - val x = Nil - val x2: Nil.type = x - val y = None - val y2: None.type = y - Console.println("Okay") -} diff --git a/tests/pending/pos/t5899.flags b/tests/pending/pos/t5899.flags deleted file mode 100644 index e8fb65d50..000000000 --- a/tests/pending/pos/t5899.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/tests/pending/pos/t5899.scala b/tests/pending/pos/t5899.scala deleted file mode 100644 index 852b4e3e7..000000000 --- a/tests/pending/pos/t5899.scala +++ /dev/null @@ -1,19 +0,0 @@ -import scala.tools.nsc._ - -trait Foo { - val global: Global - import global.{Name, Symbol, nme} - - case class Bippy(name: Name) - - def f(x: Bippy, sym: Symbol): Int = { - // no warning (!) for - // val Stable = sym.name.toTermName - - val Stable = sym.name - Bippy(Stable) match { - case Bippy(nme.WILDCARD) => 1 - case Bippy(Stable) => 2 // should not be considered unreachable - } - } -} diff --git a/tests/pending/pos/t5932.flags b/tests/pending/pos/t5932.flags deleted file mode 100644 index e8fb65d50..000000000 --- a/tests/pending/pos/t5932.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/tests/pending/pos/t5954a/A_1.scala b/tests/pending/pos/t5954a/A_1.scala deleted file mode 100644 index 10ead0b1c..000000000 --- a/tests/pending/pos/t5954a/A_1.scala +++ /dev/null @@ -1,6 +0,0 @@ -package p1 { - object `package` { - implicit class Foo(a: Any) - object Foo - } -} diff --git a/tests/pending/pos/t5954a/B_2.scala b/tests/pending/pos/t5954a/B_2.scala deleted file mode 100644 index 10ead0b1c..000000000 --- a/tests/pending/pos/t5954a/B_2.scala +++ /dev/null @@ -1,6 +0,0 @@ -package p1 { - object `package` { - implicit class Foo(a: Any) - object Foo - } -} diff --git a/tests/pending/pos/t5954b/A_1.scala b/tests/pending/pos/t5954b/A_1.scala deleted file mode 100644 index 8465e8f8c..000000000 --- a/tests/pending/pos/t5954b/A_1.scala +++ /dev/null @@ -1,6 +0,0 @@ -package p { - package object base { - class B - object B - } -} diff --git a/tests/pending/pos/t5954b/B_2.scala b/tests/pending/pos/t5954b/B_2.scala deleted file mode 100644 index f7e4704b3..000000000 --- a/tests/pending/pos/t5954b/B_2.scala +++ /dev/null @@ -1,5 +0,0 @@ -package p { - package object base { - case class B() - } -} diff --git a/tests/pending/pos/t5954c/A_1.scala b/tests/pending/pos/t5954c/A_1.scala deleted file mode 100644 index 29ad9547a..000000000 --- a/tests/pending/pos/t5954c/A_1.scala +++ /dev/null @@ -1,18 +0,0 @@ -package object A { - // these used to should be prevented by the implementation restriction - // but are now allowed - 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) -} diff --git a/tests/pending/pos/t5954c/B_2.scala b/tests/pending/pos/t5954c/B_2.scala deleted file mode 100644 index 29ad9547a..000000000 --- a/tests/pending/pos/t5954c/B_2.scala +++ /dev/null @@ -1,18 +0,0 @@ -package object A { - // these used to should be prevented by the implementation restriction - // but are now allowed - 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) -} diff --git a/tests/pending/pos/t5954d/A_1.scala b/tests/pending/pos/t5954d/A_1.scala deleted file mode 100644 index 8465e8f8c..000000000 --- a/tests/pending/pos/t5954d/A_1.scala +++ /dev/null @@ -1,6 +0,0 @@ -package p { - package object base { - class B - object B - } -} diff --git a/tests/pending/pos/t5954d/B_2.scala b/tests/pending/pos/t5954d/B_2.scala deleted file mode 100644 index a4aa2eb58..000000000 --- a/tests/pending/pos/t5954d/B_2.scala +++ /dev/null @@ -1,7 +0,0 @@ -package p { - trait T { - class B - object B - } - package object base extends T -} diff --git a/tests/pending/pos/t6084.scala b/tests/pending/pos/t6084.scala deleted file mode 100644 index 1aa1fed39..000000000 --- a/tests/pending/pos/t6084.scala +++ /dev/null @@ -1,15 +0,0 @@ -package object foo { type X[T, U] = (T => U) } - -package foo { - abstract class Foo[T, U](val d: T => U) extends (T => U) { - def f1(r: X[T, U]) = r match { case x: Foo[_,_] => x.d } // inferred ok - def f2(r: X[T, U]): (T => U) = r match { case x: Foo[_,_] => x.d } // dealiased ok - def f3(r: X[T, U]): X[T, U] = r match { case x: Foo[_,_] => x.d } // alias not ok - - // x.d : foo.this.package.type.X[?scala.reflect.internal.Types$NoPrefix$?.T, ?scala.reflect.internal.Types$NoPrefix$?.U] ~>scala.this.Function1[?scala.reflect.internal.Types$NoPrefix$?.T, ?scala.reflect.internal.Types$NoPrefix$?.U] - // at scala.Predef$.assert(Predef.scala:170) - // at scala.tools.nsc.Global.assert(Global.scala:235) - // at scala.tools.nsc.ast.TreeGen.mkCast(TreeGen.scala:252) - // at scala.tools.nsc.typechecker.Typers$Typer.typedCase(Typers.scala:2263) - } -} diff --git a/tests/pending/pos/t6123-explaintypes-implicits.flags b/tests/pending/pos/t6123-explaintypes-implicits.flags deleted file mode 100644 index b36707c7c..000000000 --- a/tests/pending/pos/t6123-explaintypes-implicits.flags +++ /dev/null @@ -1 +0,0 @@ --explaintypes diff --git a/tests/pending/pos/t6722.scala b/tests/pending/pos/t6722.scala deleted file mode 100644 index 576746c91..000000000 --- a/tests/pending/pos/t6722.scala +++ /dev/null @@ -1,11 +0,0 @@ -import scala.language.dynamics - -class Dyn extends Dynamic { - def selectDynamic(s: String): Dyn = new Dyn - def get[T]: T = null.asInstanceOf[T] -} - -object Foo { - val dyn = new Dyn - dyn.foo.bar.baz.get[String] -} diff --git a/tests/pending/pos/t6815_import.scala b/tests/pending/pos/t6815_import.scala deleted file mode 100644 index 56f4358d5..000000000 --- a/tests/pending/pos/t6815_import.scala +++ /dev/null @@ -1,16 +0,0 @@ -trait U { - trait ValOrDefDefApi { - def name: Any - } - type ValOrDefDef <: ValOrDefDefApi - type ValDef <: ValOrDefDef with ValDefApi - trait ValDefApi extends ValOrDefDefApi { this: ValDef => } - val emptyValDef: ValDef // the result type is volatile -} - -object Test { - val u: U = ??? - - // but we shouldn't let that stop us from treating it as a stable identifier for import - import u.emptyValDef.name -} diff --git a/tests/pending/pos/t6948.scala b/tests/pending/pos/t6948.scala deleted file mode 100644 index 12a1d7eaf..000000000 --- a/tests/pending/pos/t6948.scala +++ /dev/null @@ -1,10 +0,0 @@ -object t6948 { - val rand = new scala.util.Random() - def a1 = rand.shuffle(0 to 5) - // Tis not to be - // def a2 = rand.shuffle(0 until 5) - def a3 = rand.shuffle(Vector(1, 2, 3)) - def a4 = rand.shuffle(scala.collection.Seq(1, 2, 3)) - def a5 = rand.shuffle(scala.collection.immutable.Seq(1, 2, 3)) - def a6 = rand.shuffle(scala.collection.mutable.Seq(1, 2, 3)) -} diff --git a/tests/pending/pos/t6994.flags b/tests/pending/pos/t6994.flags deleted file mode 100644 index e8fb65d50..000000000 --- a/tests/pending/pos/t6994.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/tests/pending/pos/t7011.flags b/tests/pending/pos/t7011.flags deleted file mode 100644 index a4c161553..000000000 --- a/tests/pending/pos/t7011.flags +++ /dev/null @@ -1 +0,0 @@ --Ydebug -Xfatal-warnings
\ No newline at end of file diff --git a/tests/pending/pos/t7035.scala b/tests/pending/pos/t7035.scala deleted file mode 100644 index f45bd0a87..000000000 --- a/tests/pending/pos/t7035.scala +++ /dev/null @@ -1,15 +0,0 @@ -case class Y(final var x: Int, final private var y: String, final val z1: Boolean, final private val z2: Any) { - - import Test.{y => someY} - List(someY.x: Int, someY.y: String, someY.z1: Boolean, someY.z2: Any) - someY.y = "" -} - -object Test { - val y = Y(0, "", true, new {}) - val unapp: Option[(Int, String, Boolean, Any)] = // was (Int, Boolean, String, Any) !! - Y.unapply(y) - - val Y(a, b, c, d) = y - List(a: Int, b: String, c: Boolean, d: Any) -} diff --git a/tests/pending/pos/t7228.scala b/tests/pending/pos/t7228.scala deleted file mode 100644 index 5d936f652..000000000 --- a/tests/pending/pos/t7228.scala +++ /dev/null @@ -1,75 +0,0 @@ -object AdaptWithWeaklyConformantType { - implicit class D(d: Double) { def double = d*2 } - - val x1: Int = 1 - var x2: Int = 2 - val x3 = 3 - var x4 = 4 - final val x5 = 5 - final var x6 = 6 - - def f1 = x1.double - def f2 = x2.double - def f3 = x3.double - def f4 = x4.double - def f5 = x5.double - def f6 = x6.double -} - -object AdaptAliasWithWeaklyConformantType { - implicit class D(d: Double) { def double = d*2 } - type T = Int - - val x1: T = 1 - var x2: T = 2 - val x3 = (3: T) - var x4 = (4: T) - final val x5 = (5: T) - final var x6 = (6: T) - - def f1 = x1.double - def f2 = x2.double - def f3 = x3.double - def f4 = x4.double - def f5 = x5.double - def f6 = x6.double -} - -object AdaptToAliasWithWeaklyConformantType { - type U = Double - implicit class D(d: U) { def double = d*2 } - - val x1: Int = 1 - var x2: Int = 2 - val x3 = (3: Int) - var x4 = (4: Int) - final val x5 = (5: Int) - final var x6 = (6: Int) - - def f1 = x1.double - def f2 = x2.double - def f3 = x3.double - def f4 = x4.double - def f5 = x5.double - def f6 = x6.double -} - -object AdaptAliasToAliasWithWeaklyConformantType { - type U = Double - type T = Int - implicit class D(d: U) { def double = d*2 } - - val x1: T = 1 - var x2: T = 2 - val x3 = (3: T) - var x4 = (4: T) - final val x5 = (5: T) - final var x6 = (6: T) - - def f1 = x1.double - def f2 = x2.double - def f3 = x3.double - def f4 = x4.double - def f5 = x5.double - def f6 = x6.double -} diff --git a/tests/pending/pos/t7239.scala b/tests/pending/pos/t7239.scala deleted file mode 100644 index 16e9d00f1..000000000 --- a/tests/pending/pos/t7239.scala +++ /dev/null @@ -1,38 +0,0 @@ -object Test { - def BrokenMethod(): HasFilter[(Int, String)] = ??? - - trait HasFilter[B] { - def filter(p: B => Boolean) = ??? - } - - trait HasWithFilter { - def withFilter = ??? - } - - object addWithFilter { - trait NoImplicit - implicit def enrich(v: Any) - (implicit F0: NoImplicit): HasWithFilter = ??? - } - - BrokenMethod().withFilter(_ => true) // okay - BrokenMethod().filter(_ => true) // okay - - locally { - import addWithFilter._ - BrokenMethod().withFilter((_: (Int, String)) => true) // okay - } - - locally { - import addWithFilter._ - // adaptToMemberWithArgs sets the type of the tree `x` - // to ErrorType (while in silent mode, so the error is not - // reported. Later, when the fallback from `withFilter` - // to `filter` is attempted, the closure is taken to have - // have the type `<error> => Boolean`, which conforms to - // `(B => Boolean)`. Only later during pickling does the - // defensive check for erroneous types in the tree pick up - // the problem. - BrokenMethod().withFilter(x => true) // erroneous or inaccessible type. - } -} diff --git a/tests/pending/pos/t7285a.flags b/tests/pending/pos/t7285a.flags deleted file mode 100644 index e8fb65d50..000000000 --- a/tests/pending/pos/t7285a.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/tests/pending/pos/t7294.scala b/tests/pending/pos/t7294.scala deleted file mode 100644 index ccac2b140..000000000 --- a/tests/pending/pos/t7294.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Test { - // no fruitless warning as Tuple2 isn't (yet) final. - // The corresponding `neg` test will treat it as final - // for the purposes of these tests under -Xfuture. - (1, 2) match { case Seq() => 0; case _ => 1 } -} diff --git a/tests/pending/pos/t7296.scala b/tests/pending/pos/t7296.scala index 0c078d365..fcba17c08 100644 --- a/tests/pending/pos/t7296.scala +++ b/tests/pending/pos/t7296.scala @@ -1,3 +1,4 @@ +// Fails Ycheck object Test { type A = Int // Emits the implementation restriction but then proceeds to crash diff --git a/tests/pending/pos/t7426.scala b/tests/pending/pos/t7426.scala deleted file mode 100644 index 8e42ad181..000000000 --- a/tests/pending/pos/t7426.scala +++ /dev/null @@ -1,3 +0,0 @@ -class foo(x: Any) extends annotation.StaticAnnotation - -@foo(new AnyRef { }) trait A diff --git a/tests/pending/pos/t7517.scala b/tests/pending/pos/t7517.scala deleted file mode 100644 index d0462c48d..000000000 --- a/tests/pending/pos/t7517.scala +++ /dev/null @@ -1,23 +0,0 @@ -// Invalid because nested hk type parameters are no longer allowed -trait Box[ K[A[x]] ] - -object Box { - // type constructor composition - sealed trait ∙[A[_], B[_]] { type l[T] = A[B[T]] } - - // composes type constructors inside K - type SplitBox[K[A[x]], B[x]] = Box[ ({ type l[A[x]] = K[ (A ∙ B)#l] })#l ] - - def split[ K[A[x]], B[x] ](base: Box[K]): SplitBox[K,B] = ??? - - class Composed[B[_], L[A[x]] ] { - val box: Box[L] = ??? - - type Split[ A[x] ] = L[ (A ∙ B)#l ] - val a: Box[Split] = Box.split(box) - - //Either of these work: - val a1: Box[Split] = Box.split[L,B](box) - val a2: Box[ ({ type l[A[x]] = L[ (A ∙ B)#l ] })#l ] = Box.split(box) - } -} diff --git a/tests/pending/pos/t762.scala b/tests/pending/pos/t762.scala deleted file mode 100644 index 76860272e..000000000 --- a/tests/pending/pos/t762.scala +++ /dev/null @@ -1,2 +0,0 @@ -trait Foo { type T } -trait Bar extends Foo { val x : Foo { type T <: Bar.this.T } = this : this.type } diff --git a/tests/pending/pos/t7668.scala b/tests/pending/pos/t7668.scala deleted file mode 100644 index 222a13d03..000000000 --- a/tests/pending/pos/t7668.scala +++ /dev/null @@ -1,12 +0,0 @@ -trait Space { - type T - val x: T -} - -trait Extractor { - def extract(s: Space): s.T -} - -class Sub extends Extractor { - def extract(s: Space) = s.x -} diff --git a/tests/pending/pos/t7688.scala b/tests/pending/pos/t7688.scala deleted file mode 100644 index 5a846b97e..000000000 --- a/tests/pending/pos/t7688.scala +++ /dev/null @@ -1,7 +0,0 @@ -import scala.reflect.macros._ - -class A[C <: Context with Singleton](position: C#Position) - -object A { - def apply(c: Context)(in: c.Tree): A[c.type] = new A(in.pos) -} diff --git a/tests/pending/pos/t7902.scala b/tests/pending/pos/t7902.scala deleted file mode 100644 index 7793d3723..000000000 --- a/tests/pending/pos/t7902.scala +++ /dev/null @@ -1,18 +0,0 @@ -// Invalid because nested hk type parameters are no longer allowed -import scala.language.higherKinds - -object Bug { - class Tag[W[M1[X1]]] - - def ofType[W[M2[X2]]]: Tag[W] = ??? - type InSeq [M3[X3]] = Some[M3[Any]] - - // fail - val x = ofType[InSeq] - - // okay - val y: Any = ofType[InSeq] - object T { - val z = ofType[InSeq] - } -} diff --git a/tests/pending/pos/t8002-nested-scope.scala b/tests/pending/pos/t8002-nested-scope.scala deleted file mode 100644 index a2088bce7..000000000 --- a/tests/pending/pos/t8002-nested-scope.scala +++ /dev/null @@ -1,20 +0,0 @@ -// This test serves to capture the status quo, but should really -// emit an accessibiltiy error. - -// `Namers#companionSymbolOf` seems too lenient, and currently doesn't -// implement the same-scope checks mentioned: -// -// https://github.com/scala/scala/pull/2816#issuecomment-22555206 -// -class C { - def foo = { - class C { private def x = 0 } - - { - val a = 0 - object C { - new C().x - } - } - } -} diff --git a/tests/pending/pos/t8046c.scala b/tests/pending/pos/t8046c.scala deleted file mode 100644 index f05b4c15b..000000000 --- a/tests/pending/pos/t8046c.scala +++ /dev/null @@ -1,19 +0,0 @@ -trait One { - type Op[A] - type Alias[A] = Op[A] -} - -trait Three extends One { - trait Op[A] extends (A => A) - - def f1(f: Op[Int]) = f(5) - def f2(f: Alias[Int]) = f(5) - def f3[T <: Op[Int]](f: T) = f(5) - def f4[T <: Alias[Int]](f: T) = f(5) - // ./a.scala:12: error: type mismatch; - // found : Int(5) - // required: T1 - // def f4[T <: Alias[Int]](f: T) = f(5) - // ^ -} - diff --git a/tests/pending/pos/t807.scala b/tests/pending/pos/t807.scala deleted file mode 100644 index 0eeb92ea2..000000000 --- a/tests/pending/pos/t807.scala +++ /dev/null @@ -1,45 +0,0 @@ -trait Matcher { - trait Link { - type Self <: Link; - type Match <: Link { type Match = Link.this.Self; } - } - trait HasLinks { - def link(b : Boolean) : Link = null; - } - -} -trait BraceMatcher extends Matcher { - trait BracePair { - trait BraceLink extends Link; - trait OpenLink extends BraceLink { - type Self = OpenLink; - type Match = CloseLink; - } - trait CloseLink extends BraceLink { - type Self = CloseLink; - type Match = OpenLink; - } - } -} -trait IfElseMatcher extends BraceMatcher { - trait IfElseLink extends Link; - trait IfLink extends IfElseLink { - type Self = IfLink; - type Match = ElseImpl; - } - trait ElseImpl extends IfElseLink with HasLinks { - type Self = ElseImpl; - type Match = IfLink; - override def link(b : Boolean) = this; - } - val parenPair : BracePair; - trait IfWithParenImpl extends HasLinks { - object ifLink extends IfLink; - object openParen extends parenPair.OpenLink; - override def link(b : Boolean): Link = b match { - case true => ifLink; - case false => openParen; - } - } -} - diff --git a/tests/pending/pos/t8111.scala b/tests/pending/pos/t8111.scala deleted file mode 100644 index 3f0e766ce..000000000 --- a/tests/pending/pos/t8111.scala +++ /dev/null @@ -1,24 +0,0 @@ -trait T { - - def crashy(ma: Any): Unit = { - // okay - val f1 = (u: Unit) => ma - foo(f1)() - foo((u: Unit) => ma) - foo(0, (u: Any) => ma) apply () - - // crash due to side effects on the onwer of the symbol in the - // qualifier or arguments of the application during an abandoned - // names/defaults transform. The code type checkes because of - // autp-tupling which promotes and empty parmater list to `(): Unit` - foo((u: Any) => ma)() - - {{(u: Any) => ma}; this}.foo(0)() - - foo({def foo = ma; 0})() - - {def foo = ma; this}.foo(0)() - } - - def foo(f: Any): Any => Any -} diff --git a/tests/pending/pos/t8134/A_1.scala b/tests/pending/pos/t8134/A_1.scala deleted file mode 100644 index 32bce003f..000000000 --- a/tests/pending/pos/t8134/A_1.scala +++ /dev/null @@ -1,4 +0,0 @@ -// a.scala -package object pkg { - class AnyOps(val x: Any) extends AnyVal -} diff --git a/tests/pending/pos/t8134/B_2.scala b/tests/pending/pos/t8134/B_2.scala deleted file mode 100644 index 32bce003f..000000000 --- a/tests/pending/pos/t8134/B_2.scala +++ /dev/null @@ -1,4 +0,0 @@ -// a.scala -package object pkg { - class AnyOps(val x: Any) extends AnyVal -} diff --git a/tests/pending/pos/t8146a.scala b/tests/pending/pos/t8146a.scala deleted file mode 100644 index e4eb8d3fd..000000000 --- a/tests/pending/pos/t8146a.scala +++ /dev/null @@ -1,9 +0,0 @@ -trait M[+A] - -object Test { - type Inty = Int - def t1( - x: M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[Int @unchecked]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] - ): M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[M[Inty @unchecked]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] - = x -} diff --git a/tests/pending/pos/t8187.check b/tests/pending/pos/t8187.check deleted file mode 100644 index e69de29bb..000000000 --- a/tests/pending/pos/t8187.check +++ /dev/null diff --git a/tests/pending/pos/t8237b.scala b/tests/pending/pos/t8237b.scala deleted file mode 100644 index 52bb310e8..000000000 --- a/tests/pending/pos/t8237b.scala +++ /dev/null @@ -1,10 +0,0 @@ -import scala.language.higherKinds -import scala.reflect.runtime.universe._ -object Test { - - def fTt[A,E[X]<:List[X]](a: A)(implicit tt: TypeTag[E[A]]) = a - - trait TC[A] - implicit def TCListInt[A]: TC[A] = ??? - fTt(1) -} diff --git a/tests/pending/pos/t8300-patmat-a.scala b/tests/pending/pos/t8300-patmat-a.scala deleted file mode 100644 index ab3a3c960..000000000 --- a/tests/pending/pos/t8300-patmat-a.scala +++ /dev/null @@ -1,20 +0,0 @@ -// cf. pos/t8300-patmat-b.scala -trait Universe { - type Name >: Null <: AnyRef with NameApi - trait NameApi - - type TermName >: Null <: Name with TermNameApi - trait TermNameApi extends NameApi -} - -object Test extends App { - val u: Universe = ??? - import u._ - - locally { - val ScalaName: TermName = ??? - ??? match { - case ScalaName => ??? - } - } -} diff --git a/tests/pending/pos/t8300-patmat-b.scala b/tests/pending/pos/t8300-patmat-b.scala deleted file mode 100644 index 0acad4406..000000000 --- a/tests/pending/pos/t8300-patmat-b.scala +++ /dev/null @@ -1,20 +0,0 @@ -// cf. pos/t8300-patmat-a.scala -trait Universe { - type Name >: Null <: AnyRef with NameApi - trait NameApi - - type TermName >: Null <: TermNameApi with Name - trait TermNameApi extends NameApi -} - -object Test extends App { - val u: Universe = ??? - import u._ - - locally { - val ScalaName: TermName = ??? - ??? match { - case ScalaName => ??? - } - } -} diff --git a/tests/pending/pos/t8301b.scala b/tests/pending/pos/t8301b.scala deleted file mode 100644 index 4dd39139d..000000000 --- a/tests/pending/pos/t8301b.scala +++ /dev/null @@ -1,36 +0,0 @@ -// cf. pos/t8300-patmat.scala -trait Universe { - type Name >: Null <: AnyRef with NameApi - trait NameApi - - type TermName >: Null <: TermNameApi with Name - trait TermNameApi extends NameApi -} - -object Test extends App { - val u: Universe = ??? - import u._ - - val ScalaName: TermName = ??? - locally { - - ??? match { - case Test.ScalaName => ??? - } - import Test.ScalaName._ - - ??? match { - case ScalaName => ??? - } - import ScalaName._ - - // both the pattern and import led to - // stable identifier required, but SN found. Note that value SN - // is not stable because its type, Test.u.TermName, is volatile. - val SN = ScalaName - ??? match { - case SN => ??? - } - import SN._ - } -} diff --git a/tests/pending/pos/t8364.check b/tests/pending/pos/t8364.check deleted file mode 100644 index e69de29bb..000000000 --- a/tests/pending/pos/t8364.check +++ /dev/null diff --git a/tests/pending/pos/t8364.scala b/tests/pending/pos/t8364.scala deleted file mode 100644 index 7a7ea1ff1..000000000 --- a/tests/pending/pos/t8364.scala +++ /dev/null @@ -1,12 +0,0 @@ -import scala.language.dynamics - -object MyDynamic extends Dynamic { - def selectDynamic(name: String): Any = ??? -} - -object Test extends App { - locally { - import java.lang.String - MyDynamic.id - } -} diff --git a/tests/pending/pos/t8369a.check b/tests/pending/pos/t8369a.check deleted file mode 100644 index e69de29bb..000000000 --- a/tests/pending/pos/t8369a.check +++ /dev/null diff --git a/tests/pending/pos/trait-force-info.flags b/tests/pending/pos/trait-force-info.flags deleted file mode 100644 index eb4d19bcb..000000000 --- a/tests/pending/pos/trait-force-info.flags +++ /dev/null @@ -1 +0,0 @@ --optimise
\ No newline at end of file diff --git a/tests/pending/pos/trait-force-info.scala b/tests/pending/pos/trait-force-info.scala deleted file mode 100644 index c2b33869c..000000000 --- a/tests/pending/pos/trait-force-info.scala +++ /dev/null @@ -1,18 +0,0 @@ -/** This does NOT crash unless it's in the interactive package. - */ - -package scala.tools.nsc -package interactive - -trait MyContextTrees { - val self: Global - val NoContext = self.analyzer.NoContext -} -// -// error: java.lang.AssertionError: assertion failed: trait Contexts.NoContext$ linkedModule: <none>List() -// at scala.Predef$.assert(Predef.scala:160) -// at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol$1(ClassfileParser.scala:1211) -// at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.classSymbol(ClassfileParser.scala:1223) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:489) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:757) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:789) diff --git a/tests/pending/pos/virtpatmat_alts_subst.flags b/tests/pending/pos/virtpatmat_alts_subst.flags deleted file mode 100644 index 3f5a3100e..000000000 --- a/tests/pending/pos/virtpatmat_alts_subst.flags +++ /dev/null @@ -1 +0,0 @@ - -Xexperimental diff --git a/tests/pending/pos/virtpatmat_exist1.flags b/tests/pending/pos/virtpatmat_exist1.flags deleted file mode 100644 index 3f5a3100e..000000000 --- a/tests/pending/pos/virtpatmat_exist1.flags +++ /dev/null @@ -1 +0,0 @@ - -Xexperimental diff --git a/tests/pending/pos/virtpatmat_exist3.flags b/tests/pending/pos/virtpatmat_exist3.flags deleted file mode 100644 index 3f5a3100e..000000000 --- a/tests/pending/pos/virtpatmat_exist3.flags +++ /dev/null @@ -1 +0,0 @@ - -Xexperimental |