diff options
author | Martin Odersky <odersky@gmail.com> | 2016-08-22 16:18:49 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-08-26 11:13:16 +0200 |
commit | d84805299a42cb8d2c756aff5a117af24dbeaaf4 (patch) | |
tree | 924136f2161289e25bd1ecad388e88b13be248fc /tests/pending | |
parent | 8f5bd779903d5c9f29bc3750391ffacbf3cf869e (diff) | |
download | dotty-d84805299a42cb8d2c756aff5a117af24dbeaaf4.tar.gz dotty-d84805299a42cb8d2c756aff5a117af24dbeaaf4.tar.bz2 dotty-d84805299a42cb8d2c756aff5a117af24dbeaaf4.zip |
Recategorize tests
Passing tests from pending/pos go in pos. Some others
go in diabled/not-testable. These are tests that require
a compilation order which we cannot yet do with our unit
testing framework. Compiling them alltogether (as is now
doen in junit) does not work either for them because they
contain a duplicate class.
Diffstat (limited to 'tests/pending')
78 files changed, 5 insertions, 953 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/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/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.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/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/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/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/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/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/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/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/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/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.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 |