diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-17 18:44:39 +0100 |
---|---|---|
committer | Tobias Schlatter <tobias@meisch.ch> | 2014-03-21 11:28:30 +0100 |
commit | c854cc7fcc9d0f889c6235c1534133cff7360e7f (patch) | |
tree | a17c01b5a46e34e8640d543ae12eb06fde598892 /tests/untried/pos | |
parent | 474b35ff0160c1174674757895e93818dc4f2f19 (diff) | |
download | dotty-c854cc7fcc9d0f889c6235c1534133cff7360e7f.tar.gz dotty-c854cc7fcc9d0f889c6235c1534133cff7360e7f.tar.bz2 dotty-c854cc7fcc9d0f889c6235c1534133cff7360e7f.zip |
More tests
Diffstat (limited to 'tests/untried/pos')
44 files changed, 0 insertions, 661 deletions
diff --git a/tests/untried/pos/t1000.scala b/tests/untried/pos/t1000.scala deleted file mode 100644 index 613af76b9..000000000 --- a/tests/untried/pos/t1000.scala +++ /dev/null @@ -1,8 +0,0 @@ -object A { - println("""This a "raw" string ending with a "double quote"""") -} - -object Test extends App { - val xs = Array(1, 2, 3) - Console.println(xs.filter(_ >= 0).length) -} diff --git a/tests/untried/pos/t1001.scala b/tests/untried/pos/t1001.scala deleted file mode 100644 index 7a06bfa0e..000000000 --- a/tests/untried/pos/t1001.scala +++ /dev/null @@ -1,115 +0,0 @@ -// was t1001.scala -class Foo; - -object Overload{ - val foo = classOf[Foo].getConstructors()(0) - foo.getDeclaringClass -} - -// was t1001.scala - -// I suspect the stack overflow is occurring when the compiler is determining the types for the following line at the end of the file:- -// val data = List(N26,N25) - -abstract class A -{ - // commenting out the following line (only) leads to successful compilation - protected val data: List[A] -} - -trait B[T <: B[T]] extends A { self: T => } - -abstract class C extends A -{ - // commenting out the following line (only) leads to successful compilation - protected val data: List[C] -} - -abstract class D extends C with B[D] {} - -abstract class Ee extends C with B[Ee] -{ -} - - -object N1 extends D -{ - val data = Nil -} - -object N2 extends D -{ - val data = Nil -} - -object N5 extends D -{ - val data = List(N1) -} - -object N6 extends D -{ - val data = List(N1) -} - -object N8 extends D -{ - val data = List(N1) -} - -object N10 extends D -{ - val data = Nil -} - -object N13 extends D -{ - val data = List(N2) -} - -object N14 extends D -{ - val data = List(N5,N10,N8) -} - -object N15 extends D -{ - val data = List(N14) -} - -object N16 extends D -{ - val data = List(N13,N6,N15) -} - -object N17 extends D -{ - val data = List(N16) -} - -object N21 extends D -{ - val data = List(N16) -} - -object N22 extends D -{ - val data = List(N17) -} - -object N25 extends D -{ - val data = List(N22) -} - -object N26 extends Ee -{ - val data = List(N21,N17) -} - -// Commenting out the following object (only) leads to successful compilation -object N31 extends Ee -{ - // If we use List[C](N26,N25), we achieve successful compilation - val data = List[C](N26,N25) -} diff --git a/tests/untried/pos/t1006.scala b/tests/untried/pos/t1006.scala deleted file mode 100644 index 2163b2b74..000000000 --- a/tests/untried/pos/t1006.scala +++ /dev/null @@ -1,15 +0,0 @@ -object Test extends App { - -def test(): Unit = { - - abstract class A[T] { - def myVal: T - } - - class B[T1](value: T1) extends A[T1] { - def myVal: T1 = value - } - - Console.println(new B[Int](23).myVal) -} -} diff --git a/tests/untried/pos/t1014.scala b/tests/untried/pos/t1014.scala deleted file mode 100644 index 6fb7f7ba4..000000000 --- a/tests/untried/pos/t1014.scala +++ /dev/null @@ -1,16 +0,0 @@ -class NodeSeq -class Elem extends NodeSeq - -class EO extends App with Moo { - // return type is Flog, inherited from overridden method. - // implicit conversions are applied because expected type `pt` is `Flog` when `computeType(rhs, pt)`. - def cat = (??? : Elem) - - implicit def nodeSeqToFlog(in: Elem): Flog = new Flog(in) -} - -trait Moo { - def cat: Flog -} - -class Flog(val in: NodeSeq) diff --git a/tests/untried/pos/t1027.scala b/tests/untried/pos/t1027.scala deleted file mode 100644 index 02ba9a8a3..000000000 --- a/tests/untried/pos/t1027.scala +++ /dev/null @@ -1,18 +0,0 @@ -object T1027 extends App { - trait Comparable[T <: Comparable[T]] { this: T => - def < (that: T): Boolean - def <=(that: T): Boolean = this < that || this == that - def > (that: T): Boolean = that < this - def >=(that: T): Boolean = that <= this - } - class A(val x: String) extends Comparable[A]{ - def < (that: A) = this.x < that.x - } - val a = new A("a") - val b = new A("b") - println(a < b) - println(a > b) - println(a <= b) - println(a >= b) - println("Comparable traits : " + (new A("x") > new A("y")).toString) - } diff --git a/tests/untried/pos/t1034.scala b/tests/untried/pos/t1034.scala deleted file mode 100644 index 9d966334a..000000000 --- a/tests/untried/pos/t1034.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Terminal { - def apply[a] : a => Unit = { a => () } - val i0 = Terminal.apply[Int] - val i1 = (Terminal)[Int] - val i2 = Terminal[Int] -} diff --git a/tests/untried/pos/t1035.scala b/tests/untried/pos/t1035.scala deleted file mode 100644 index e0a9379c7..000000000 --- a/tests/untried/pos/t1035.scala +++ /dev/null @@ -1,32 +0,0 @@ -//A fatal error or Scala compiler -// Scala compiler version 2.7.1-final -- (c) 2002-2011 LAMP/EPFL -// Carlos Loria cloria@artinsoft.com -// 7/10/2008 - -class A { - var name:String = _ - def getName() = name - def this(name:String, age:Int){this();this.name=name} - -} - -class B(name:String) extends A(name,0){ -} - -class D { - - object A { - def unapply(p:A) = Some(p.getName) - } - - object B { - def unapply(p:B) = Some(p.getName) - } - def foo(p:Any) = p match { - case B(n) => println("B") - case A(n) => println("A") - - - } - -} diff --git a/tests/untried/pos/t1048.scala b/tests/untried/pos/t1048.scala deleted file mode 100644 index cd16db5b6..000000000 --- a/tests/untried/pos/t1048.scala +++ /dev/null @@ -1,14 +0,0 @@ -trait T[U] { - def x: T[V] forSome { type V <: U } -} - -object T { - def unapply[U](t: T[U]): Option[T[V] forSome { type V <: U }] = Some(t.x) -} - -object Test { - def f[W](t: T[W]) = t match { - case T(T(_)) => () - } -} - diff --git a/tests/untried/pos/t1049.scala b/tests/untried/pos/t1049.scala deleted file mode 100644 index 61d99f946..000000000 --- a/tests/untried/pos/t1049.scala +++ /dev/null @@ -1,7 +0,0 @@ -package t1049 - -abstract class Test { - type T <: A - class A { self: T => } - class B extends A { self: T => } -} diff --git a/tests/untried/pos/t1050.scala b/tests/untried/pos/t1050.scala deleted file mode 100644 index d34b0cff1..000000000 --- a/tests/untried/pos/t1050.scala +++ /dev/null @@ -1,10 +0,0 @@ -package t1050 - -abstract class A { - type T <: scala.AnyRef - class A { this: T => - def b = 3 - def c = b - b - } -} diff --git a/tests/untried/pos/t1053.scala b/tests/untried/pos/t1053.scala deleted file mode 100644 index 1d4dfb637..000000000 --- a/tests/untried/pos/t1053.scala +++ /dev/null @@ -1,6 +0,0 @@ -trait T[A] { trait U { type W = A; val x = 3 } } - -object Test { - val x : ({ type V = T[this.type] })#V = null - val y = new x.U { } -} diff --git a/tests/untried/pos/t1070.scala b/tests/untried/pos/t1070.scala deleted file mode 100644 index 1622043a8..000000000 --- a/tests/untried/pos/t1070.scala +++ /dev/null @@ -1,4 +0,0 @@ -import scala.beans.BeanProperty; -trait beanpropertytrait { - @BeanProperty var myVariable: Long = -1l; -} diff --git a/tests/untried/pos/t1071.scala b/tests/untried/pos/t1071.scala deleted file mode 100644 index 59149a021..000000000 --- a/tests/untried/pos/t1071.scala +++ /dev/null @@ -1,17 +0,0 @@ -class C { - private val a = 0 - def getA = a -} - -class D(c: C) { - def a = c.getA -} - -object Test { - implicit def c2d(c: C): D = new D(c) - - val c = new C - (c: D).a // works - c.a // error -} - diff --git a/tests/untried/pos/t1075.scala b/tests/untried/pos/t1075.scala deleted file mode 100644 index 5f72957da..000000000 --- a/tests/untried/pos/t1075.scala +++ /dev/null @@ -1,17 +0,0 @@ -class Directory(var dir_ : String) -{ - if (!dir_.startsWith("/")) { - throw new RuntimeException("Invalid directory") - } - dir_ = dir_.replaceAll("/{2,}", "/") - - def this(serialized : Array[Byte]) = { - this(new String(serialized, "UTF-8")) - } - - def dir = dir_ -} - -object Test extends Directory("/bab/dkkd//dkkdkd//kdkdk") with App { - println(dir) -} diff --git a/tests/untried/pos/t1085.scala b/tests/untried/pos/t1085.scala deleted file mode 100644 index c59e657cb..000000000 --- a/tests/untried/pos/t1085.scala +++ /dev/null @@ -1,9 +0,0 @@ -trait Functor[a] { - type MyType[a] -} - -object Test { - def listFunctor[a]: Functor[a]{type MyType[x]=List[x]} = new Functor[a] { - type MyType[t]=List[t] - } -} diff --git a/tests/untried/pos/t1090.scala b/tests/untried/pos/t1090.scala deleted file mode 100644 index a9bce90b0..000000000 --- a/tests/untried/pos/t1090.scala +++ /dev/null @@ -1,16 +0,0 @@ -object Test { - trait Manager { - type Node; - def iterator : Iterator[Node] - } - trait Core { - type Node; - trait NodeImpl - trait Manager extends Test.Manager { - type Node = Core.this.Node - } - def f(manager : Manager) = manager.iterator.foreach{ - case node : NodeImpl => - } - } -} diff --git a/tests/untried/pos/t1107a.scala b/tests/untried/pos/t1107a.scala deleted file mode 100644 index 0bf40bb4c..000000000 --- a/tests/untried/pos/t1107a.scala +++ /dev/null @@ -1,10 +0,0 @@ -object F { - type AnyClass = Class[_] - def tryf[T](ignore: List[AnyClass])(f: => T): Any = { - try { - f - } catch { - case e if ignore == null || ignore.isEmpty => {false} - } - } -} diff --git a/tests/untried/pos/t1119.scala b/tests/untried/pos/t1119.scala deleted file mode 100644 index 8b36877c4..000000000 --- a/tests/untried/pos/t1119.scala +++ /dev/null @@ -1,10 +0,0 @@ -trait B -{ - type T >: this.type <: B - - - // compile-time check: have we achieved our objective? - def test: T = this -} - - diff --git a/tests/untried/pos/t1131.scala b/tests/untried/pos/t1131.scala deleted file mode 100644 index 1b2a90457..000000000 --- a/tests/untried/pos/t1131.scala +++ /dev/null @@ -1,4 +0,0 @@ -trait A { self: Any { def p: Any } => - def f(b: => Unit): Unit = {} - f { p } -} diff --git a/tests/untried/pos/t1133.scala b/tests/untried/pos/t1133.scala deleted file mode 100644 index 562b528ea..000000000 --- a/tests/untried/pos/t1133.scala +++ /dev/null @@ -1,32 +0,0 @@ -object Match -{ - def main(args: Array[String]) = { - args(0) match { - case Extractor1(Extractor2(Extractor3("dog", "dog", "dog"), x2, x3), b, c, Extractor3("b", "b", f), e) => println(e) - case Extractor3(Extractor2(Extractor1("a", "aa", "aaa", "aa", "a"), Extractor2("a", "aa", "aaa"), e), y, z) => println(e) - case Extractor2(Extractor3("a", "a", x), Extractor3("b", "b", y), Extractor3("c", "c", z)) => println(z) - case _ => println("fail") - } - } - - object Extractor1 { - def unapply(x: Any) = x match { - case x: String => Some(x, x+x, x+x+x, x+x, x) - case _ => None - } - } - - object Extractor2 { - def unapply(x: Any) = x match { - case x: String => Some(x, x+x, x+x+x) - case _ => None - } - } - - object Extractor3 { - def unapply(x: Any) = x match { - case x: String => Some(x, x, x) - case _ => None - } - } -} diff --git a/tests/untried/pos/t1136.scala b/tests/untried/pos/t1136.scala deleted file mode 100644 index 92d603e69..000000000 --- a/tests/untried/pos/t1136.scala +++ /dev/null @@ -1,8 +0,0 @@ -object test { - def foo(s: Int*): Unit = { - s.toList match { - case t: List[Int] => foo(t: _*) - //case _ => // unreachable code - } - } -} diff --git a/tests/untried/pos/t1146.scala b/tests/untried/pos/t1146.scala deleted file mode 100644 index 7e5adc4f4..000000000 --- a/tests/untried/pos/t1146.scala +++ /dev/null @@ -1,6 +0,0 @@ -class Code { - val _ = () => { - val arr = Array[String]() - null - } -} diff --git a/tests/untried/pos/t1147.scala b/tests/untried/pos/t1147.scala deleted file mode 100644 index ff2e8bc52..000000000 --- a/tests/untried/pos/t1147.scala +++ /dev/null @@ -1,6 +0,0 @@ -class App(arg: String) { - @deprecated("..") def this() = { - this("foo") - } -} - diff --git a/tests/untried/pos/t115.scala b/tests/untried/pos/t115.scala deleted file mode 100644 index 0e6a63c16..000000000 --- a/tests/untried/pos/t115.scala +++ /dev/null @@ -1,9 +0,0 @@ -class S[A](f: A => A, x: A) { - Console.println(f(x)); -} -class T[B](f: B => B, y: B) extends S((x: B) => f(x), y) { -} -object Test extends App { - new T[Int](x => x * 2, 1); - val f = new S((x: Int) => x, 1); -} diff --git a/tests/untried/pos/t1159.scala b/tests/untried/pos/t1159.scala deleted file mode 100644 index 7e09418b2..000000000 --- a/tests/untried/pos/t1159.scala +++ /dev/null @@ -1,13 +0,0 @@ -object test17 { - def main(args : Array[String]) = { - val value = - if (false) - new java.lang.Float(0) - else if (false) - new java.lang.Long(0) - else - new java.lang.Integer(0) - - println(value) - } -} diff --git a/tests/untried/pos/t116.scala b/tests/untried/pos/t116.scala deleted file mode 100644 index 1e31b71bf..000000000 --- a/tests/untried/pos/t116.scala +++ /dev/null @@ -1,6 +0,0 @@ -class C { - def this(x: Int) = { - this(); - class D extends C; - } -} diff --git a/tests/untried/pos/t1164.scala b/tests/untried/pos/t1164.scala deleted file mode 100644 index ab58c1d6b..000000000 --- a/tests/untried/pos/t1164.scala +++ /dev/null @@ -1,29 +0,0 @@ - - -object test { - - class Foo[a](val arg : a) - - object Foo { - def apply [a](arg : a, right :a) = new Foo[a](arg) - def unapply [a](m : Foo[a]) = Some (m.arg) - } - - def matchAndGetArgFromFoo[a]( e:Foo[a]):a = {e match { case Foo(x) => x }} - - - // Try the same thing as above but use function as argument to Bar - // constructor - - type FunIntToA [a] = (Int) => a - class Bar[a] (var f: FunIntToA[a]) - - object Bar { - def apply[a](f: FunIntToA[a]) = new Bar[a](f) - def unapply[a](m: Bar[a]) = Some (m.f) - } - - def matchAndGetFunFromBar[a](b:Bar[a]) : FunIntToA[a] = { b match { case Bar(x) => x}} - - -} diff --git a/tests/untried/pos/t1168.scala b/tests/untried/pos/t1168.scala deleted file mode 100644 index 75638e792..000000000 --- a/tests/untried/pos/t1168.scala +++ /dev/null @@ -1,16 +0,0 @@ -object Test extends App { - - trait SpecialException {} - - try { - throw new Exception - } catch { - case e : SpecialException => { - println("matched SpecialException: "+e) - assume(e.isInstanceOf[SpecialException]) - } - case e : Exception => { - assume(e.isInstanceOf[Exception]) - } - } -} diff --git a/tests/untried/pos/t1185.scala b/tests/untried/pos/t1185.scala deleted file mode 100644 index fa863d158..000000000 --- a/tests/untried/pos/t1185.scala +++ /dev/null @@ -1,15 +0,0 @@ -class Test { - private[this] var member = 0; - def foo() = { - (() => member=1)() - } - def look=member -} - -object Main{ - def main(args : Array[String]): Unit = { - val fff=new Test() - fff.foo() - assert(1==fff.look) - } -} diff --git a/tests/untried/pos/t119.scala b/tests/untried/pos/t119.scala deleted file mode 100644 index 44a156675..000000000 --- a/tests/untried/pos/t119.scala +++ /dev/null @@ -1,7 +0,0 @@ -class K[E] { - case class A(v: E) {} -} - -class K2 extends K[Int] { - val A(v) = A(42) -} diff --git a/tests/untried/pos/t1203a.scala b/tests/untried/pos/t1203a.scala deleted file mode 100644 index cf5ab9fba..000000000 --- a/tests/untried/pos/t1203a.scala +++ /dev/null @@ -1,13 +0,0 @@ -class Node -object NodeSeq { - implicit def seqToNodeSeq(s: Seq[Node]): NodeSeq = ??? -} -abstract class NodeSeq extends collection.immutable.Seq[Node] - -case class ant(t: String) extends scala.annotation.Annotation -object Test { - def main(args: Array[String]): Unit = { - val a: NodeSeq @ant("12") = Nil - println(a) - } -} diff --git a/tests/untried/pos/t1208.scala b/tests/untried/pos/t1208.scala deleted file mode 100644 index 9ac783d39..000000000 --- a/tests/untried/pos/t1208.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test { - object Foo - val f: Option[Foo.type] = Some(Foo) -} diff --git a/tests/untried/pos/t121.scala b/tests/untried/pos/t121.scala deleted file mode 100644 index 78ddc41ee..000000000 --- a/tests/untried/pos/t121.scala +++ /dev/null @@ -1,3 +0,0 @@ -class Bug121_B(b: Array[Byte]) { - def get(x: Int): Byte = return b(x); -} diff --git a/tests/untried/pos/t1210a.scala b/tests/untried/pos/t1210a.scala deleted file mode 100644 index b3492f96e..000000000 --- a/tests/untried/pos/t1210a.scala +++ /dev/null @@ -1,15 +0,0 @@ -// both styles of abstraction should behave the same -// related to 1210 because that bug broke the OO version below -trait OO { - abstract class Test { self => - type T - - val v: Test {type T = self.T} = self.v.v - } -} - -trait FP { - abstract class Test[T] { - val v: Test[T] = v.v - } -} diff --git a/tests/untried/pos/t122.scala b/tests/untried/pos/t122.scala deleted file mode 100644 index 630e24ce4..000000000 --- a/tests/untried/pos/t122.scala +++ /dev/null @@ -1,4 +0,0 @@ -class L { - val List(v:Int, 2) = List(2, v:Int) - val (a:Int, b:Int) = (1, a) -} diff --git a/tests/untried/pos/t1226.scala b/tests/untried/pos/t1226.scala deleted file mode 100644 index 0af21cbb6..000000000 --- a/tests/untried/pos/t1226.scala +++ /dev/null @@ -1,8 +0,0 @@ -package graphs; - -abstract class Graph (private[graphs] val mappings : Any){ -} - -class Nodes (mappings : Any) extends Graph(mappings) { - mappings.toString; -} diff --git a/tests/untried/pos/t1236.scala b/tests/untried/pos/t1236.scala deleted file mode 100644 index 75a1befd2..000000000 --- a/tests/untried/pos/t1236.scala +++ /dev/null @@ -1,14 +0,0 @@ -trait Empty[E[_]] { - def e[A]: E[A] -} - -object T { - val ListEmpty = new Empty[List] { - def e[A] = Nil - } - - def foo[F[_]](q:(String,String)) = "hello" - def foo[F[_]](e: Empty[F]) = "world" - - val x = foo[List](ListEmpty) -} diff --git a/tests/untried/pos/t1237.scala b/tests/untried/pos/t1237.scala deleted file mode 100644 index 31ba2966a..000000000 --- a/tests/untried/pos/t1237.scala +++ /dev/null @@ -1,14 +0,0 @@ -class HelloWorld { - def main(args: Array[String]): Unit = { - - object TypeBool; - - trait Fct { - def g(x : Int) = TypeBool // breaks. - - // def g(x : Int) = 3 // fine. - } - - () - } -} diff --git a/tests/untried/pos/t124.scala b/tests/untried/pos/t124.scala deleted file mode 100644 index 9aed6786f..000000000 --- a/tests/untried/pos/t124.scala +++ /dev/null @@ -1,5 +0,0 @@ -class N{ - val F: Any => Any = (x:Any) => F(x); - val f:(Any => Any) = (x:Any) => f(x); - val g: Any => Any = (x:Any) => g(x); -} diff --git a/tests/untried/pos/t1260.scala b/tests/untried/pos/t1260.scala deleted file mode 100644 index 02f9e7e6b..000000000 --- a/tests/untried/pos/t1260.scala +++ /dev/null @@ -1,18 +0,0 @@ -case class Foo(a: String, b: String) - -object Bar { - def unapply(s: String): Option[Long] = - try { Some(s.toLong) } catch { case _ => None } -} - -object Test { - def main(args: Array[String]): Unit = { - val f = Foo("1", "2") - f match { - case Foo(Bar(1), Bar(2)) => 1 - case Foo(Bar(i), Bar(j)) if i >= 0 => 2 - case _ => 3 - } - } -} - diff --git a/tests/untried/pos/t1272.scala b/tests/untried/pos/t1272.scala deleted file mode 100644 index 916b783bb..000000000 --- a/tests/untried/pos/t1272.scala +++ /dev/null @@ -1,9 +0,0 @@ -object ImplicitTest { - implicit val i : Int = 10 - implicit def a(implicit i : Int) : Array[Byte] = null - implicit def b[T](implicit i : Int) : Array[T] = null - - def fn[T](implicit x : T) = 0 - - val x = fn[Array[Byte]] -} diff --git a/tests/untried/pos/t1279a.scala b/tests/untried/pos/t1279a.scala deleted file mode 100644 index 18b1e53f4..000000000 --- a/tests/untried/pos/t1279a.scala +++ /dev/null @@ -1,39 +0,0 @@ -// covariant linked list -abstract class M { - self => - - type T - final type selfType = M {type T <: self.T} - type actualSelfType >: self.type <: selfType - - def next: selfType - - // I don't understand why this doesn't compile, but that's a separate matter - // error: method all2 cannot be accessed in M.this.selfType - // because its instance type => Stream[M{type T <: M.this.selfType#T}] - // contains a malformed type: M.this.selfType#T - def all2: Stream[M {type T <: self.T}] = Stream.cons(self: actualSelfType, next.all2) - - // compiles successfully - def all3: Stream[M {type T <: self.T}] = all3Impl(self: actualSelfType) - private def all3Impl(first: M {type T <: self.T}): Stream[M {type T <: self.T}] = Stream.cons(first, all3Impl(first.next)) - - def all4: Stream[M {type T <: self.T}] = Unrelated.all4Impl[T](self: actualSelfType) -} - -// TODO!!! fix this bug for real, it compiles successfully, but weird types are inferred -object Unrelated { - // compiles successfully - def all4Impl[U](first: M {type T <: U}): Stream[M {type T <: U}] = Stream.cons(first, all4Impl[U](first.next)) - - // should compile successfully without the [U], but: - // def all4ImplFail[U](first: M {type T <: U}): Stream[M {type T <: U}] = Stream.cons(first, all4ImplFail(first.next)) - // - // test/files/pos/t1279a.scala:31: error: type mismatch; - // found : first.selfType - // (which expands to) M{type T <: first.T} - // required: M{type T <: Nothing} - // def all4ImplFail[U](first: M {type T <: U}): Stream[M {type T <: U}] = Stream.cons(first, all4ImplFail(first.next)) - // ^ - // one error found -} diff --git a/tests/untried/pos/t1280.scala b/tests/untried/pos/t1280.scala deleted file mode 100644 index 39406b2e3..000000000 --- a/tests/untried/pos/t1280.scala +++ /dev/null @@ -1 +0,0 @@ -trait X { x => type T >: Null; new X { type T = Any with x.T } } diff --git a/tests/untried/pos/t1292.scala b/tests/untried/pos/t1292.scala deleted file mode 100644 index 83a996d53..000000000 --- a/tests/untried/pos/t1292.scala +++ /dev/null @@ -1,33 +0,0 @@ -trait Foo[T <: Foo[T, Enum], Enum <: Enumeration] { - type StV = Enum#Value - type Meta = MegaFoo[T, Enum] - - type Slog <: Enumeration - - def getSingleton: Meta -} - -trait MegaFoo[T <: Foo[T, Enum], Enum <: Enumeration] extends Foo[T, Enum] { - def doSomething(what: T, misc: StV, dog: Meta#Event) = None - abstract class Event - object Event - - def stateEnumeration: Slog - def se2: Enum -} - -object E extends Enumeration { - val A = Value - val B = Value -} - -class RFoo extends Foo[RFoo, E.type] { - def getSingleton = MegaRFoo - - type Slog = E.type -} - -object MegaRFoo extends RFoo with MegaFoo[RFoo, E.type] { - def stateEnumeration = E - def se2 = E -} |