diff options
Diffstat (limited to 'test/pending/pos')
70 files changed, 0 insertions, 1065 deletions
diff --git a/test/pending/pos/bug4704.scala b/test/pending/pos/bug4704.scala deleted file mode 100644 index 6af719adf7..0000000000 --- a/test/pending/pos/bug4704.scala +++ /dev/null @@ -1,36 +0,0 @@ -trait Bar { - def f1 = super.hashCode - def f2 = super[Object].hashCode - def f3 = super[ScalaObject].hashCode - - override def hashCode = 1 -} -trait Barzoo { - def g1 = super.hashCode - def g2 = super[Object].hashCode - def g3 = super[ScalaObject].hashCode - - override def hashCode = 2 -} - -trait Foo extends Bar with Barzoo { - def f4 = super.hashCode - def f5 = super[Object].hashCode - def f6 = super[ScalaObject].hashCode - def f6b = super[Bar].hashCode - def g4 = super[Barzoo].hashCode - - override def hashCode = super[Bar].hashCode + super[Barzoo].hashCode -} - -class Quux extends Foo { - override def hashCode = super.hashCode + super[Object].hashCode + super[ScalaObject].hashCode + super[Foo].hashCode -} - -trait Borp extends Quux { - def f12 = super.hashCode - def f14 = super[ScalaObject].hashCode - def f15 = super[Quux].hashCode - override def hashCode = super[Quux].hashCode -} - diff --git a/test/pending/pos/inference.scala b/test/pending/pos/inference.scala deleted file mode 100644 index ee462b6bcc..0000000000 --- a/test/pending/pos/inference.scala +++ /dev/null @@ -1,41 +0,0 @@ -import scala.reflect.runtime.universe._ - -// inference illuminator -object Test { - class D1[T1 : TypeTag, T2 <: T1 : TypeTag](x: T1) { println(typeOf[(T1, T2)]) } - class D2[T1 : TypeTag, T2 >: T1 : TypeTag](x: T1) { println(typeOf[(T1, T2)]) } - class D3[+T1 : TypeTag, T2 <: T1 : TypeTag](x: T1) { println(typeOf[(T1, T2)]) } - class D4[-T1 : TypeTag, T2 >: T1 : TypeTag](x: T1) { println(typeOf[(T1, T2)]) } - - class E1[T1 : TypeTag, T2 <: T1 : TypeTag](x: D1[T1, T2]) { println(typeOf[(T1, T2)]) } - class E2[T1 : TypeTag, T2 >: T1 : TypeTag](x: D2[T1, T2]) { println(typeOf[(T1, T2)]) } - class E3[+T1 : TypeTag, T2 <: T1 : TypeTag](x: D3[T1, T2]) { println(typeOf[(T1, T2)]) } - class E4[-T1 : TypeTag, T2 >: T1 : TypeTag](x: D4[T1, T2]) { println(typeOf[(T1, T2)]) } - - def main(args: Array[String]): Unit = { - // WHY YOU NO LIKE NOTHING SO MUCH SCALAC? - val d1 = new D1(5) - val d2 = new D2(5) - val d3 = new D3(5) - val d4 = new D4(5) - - new E1(d1) // fails - new E2(d2) - new E3(d3) // fails - new E4(d4) - } - // found : Test.D1[Int,Nothing] - // required: Test.D1[Int,T2] - // Note: Nothing <: T2, but class D1 is invariant in type T2. - // You may wish to define T2 as +T2 instead. (SLS 4.5) - // new E1(d1) - // ^ - // test/pending/pos/inference.scala:22: error: type mismatch; - // found : Test.D3[Int,Nothing] - // required: Test.D3[Int,T2] - // Note: Nothing <: T2, but class D3 is invariant in type T2. - // You may wish to define T2 as +T2 instead. (SLS 4.5) - // new E3(d3) - // ^ - // two errors found -}
\ No newline at end of file diff --git a/test/pending/pos/misc/A.java b/test/pending/pos/misc/A.java deleted file mode 100644 index 8eaa341151..0000000000 --- a/test/pending/pos/misc/A.java +++ /dev/null @@ -1,13 +0,0 @@ -package test; - -import static test.A.STATE.UNDEF; - -class A { - - public STATE state = UNDEF; - - protected static enum STATE { - UNDEF - } - -} diff --git a/test/pending/pos/misc/B.scala b/test/pending/pos/misc/B.scala deleted file mode 100644 index afc30944f5..0000000000 --- a/test/pending/pos/misc/B.scala +++ /dev/null @@ -1,7 +0,0 @@ -package test - -class B { - - def myA = new A() - -} diff --git a/test/pending/pos/misc/J.java b/test/pending/pos/misc/J.java deleted file mode 100644 index 4805791154..0000000000 --- a/test/pending/pos/misc/J.java +++ /dev/null @@ -1,4 +0,0 @@ -class J { - void f (@Override{ name = value } int x) {} - void g (String ... x) {} -} diff --git a/test/pending/pos/misc/S.scala b/test/pending/pos/misc/S.scala deleted file mode 100644 index c5bfb26f18..0000000000 --- a/test/pending/pos/misc/S.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends J { - def h(xs: String*) {} - g("a", "b", "c") -} diff --git a/test/pending/pos/no-widen-locals.flags b/test/pending/pos/no-widen-locals.flags deleted file mode 100644 index 85d8eb2ba2..0000000000 --- a/test/pending/pos/no-widen-locals.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings diff --git a/test/pending/pos/no-widen-locals.scala b/test/pending/pos/no-widen-locals.scala deleted file mode 100644 index 013e63f0a2..0000000000 --- a/test/pending/pos/no-widen-locals.scala +++ /dev/null @@ -1,19 +0,0 @@ -// Worked from r23262 until that was reverted somewhere -// around r25016. -import annotation.switch - -object Test { - def f(x: Int) = { - val X1 = 5 - val X2 = 10 - val X3 = 15 - val X4 = 20 - - (x: @switch) match { - case X1 => 1 - case X2 => 2 - case X3 => 3 - case X4 => 4 - } - } -} diff --git a/test/pending/pos/nothing.scala b/test/pending/pos/nothing.scala deleted file mode 100644 index f76017fb16..0000000000 --- a/test/pending/pos/nothing.scala +++ /dev/null @@ -1,24 +0,0 @@ -// More shoddy treatment for nothing. -class A { - class Q3A[+T1, T2 <: T1](x: T1) - class Q3B[+T1, T2 <: T1](x: Q3A[T1, T2]) - - val x1 = new Q3B(new Q3A("a")) - val x2 = new Q3B(new Q3A[String, Nothing]("a")) - val x3 = new Q3B(new Q3A[String, Null]("a")) - // test/pending/pos/nothing.scala:5: error: type mismatch; - // found : A.this.Q3A[String,Nothing] - // required: A.this.Q3A[String,T2] - // Note: Nothing <: T2, but class Q3A is invariant in type T2. - // You may wish to define T2 as +T2 instead. (SLS 4.5) - // val x1 = new Q3B(new Q3A("a")) - // ^ - // test/pending/pos/nothing.scala:6: error: type mismatch; - // found : A.this.Q3A[String,Nothing] - // required: A.this.Q3A[String,T2] - // Note: Nothing <: T2, but class Q3A is invariant in type T2. - // You may wish to define T2 as +T2 instead. (SLS 4.5) - // val x2 = new Q3B(new Q3A[String, Nothing]("a")) - // ^ - // two errors found -} diff --git a/test/pending/pos/overloading-boundaries.scala b/test/pending/pos/overloading-boundaries.scala deleted file mode 100644 index d2e9fdbb12..0000000000 --- a/test/pending/pos/overloading-boundaries.scala +++ /dev/null @@ -1,37 +0,0 @@ -package bar { - object bippy extends (Double => String) { - def apply(x: Double): String = "Double" - } -} - -package object bar { - def bippy(x: Int, y: Int, z: Int) = "(Int, Int, Int)" -} - -object Test { - def main(args: Array[String]): Unit = { - println(bar.bippy(5.5d)) - println(bar.bippy(1, 2, 3)) - } -} - -/**** - -% scalac3 a.scala -a.scala:13: error: not enough arguments for method bippy: (x: Int, y: Int, z: Int)String. -Unspecified value parameters y, z. - println(bar.bippy(5.5d)) - ^ -one error found - -# Comment out the call to bar.bippy(5.5d) - compiles -% scalac3 a.scala - -# Compiles only from pure source though - if classes are present, fails. -% scalac3 a.scala -a.scala:2: error: bippy is already defined as method bippy in package object bar - object bippy extends (Double => String) { - ^ -one error found - -****/ diff --git a/test/pending/pos/pattern-typing.scala b/test/pending/pos/pattern-typing.scala deleted file mode 100644 index 7286cc38af..0000000000 --- a/test/pending/pos/pattern-typing.scala +++ /dev/null @@ -1,29 +0,0 @@ -import scala.language.higherKinds - -trait Bound[B] - -package p1 { - case class Sub[B <: Bound[B]](p: B) - object Test { - def g[A](x: Bound[A]) = () - def f(x: Any) = x match { case Sub(p) => g(p) } - } -} - -package p2 { - trait Traversable[+A] { def head: A = ??? } - trait Seq[+A] extends Traversable[A] { def length: Int = ??? } - - case class SubHK[B <: Bound[B], CC[X] <: Traversable[X]](xs: CC[B]) - class MyBound extends Bound[MyBound] - class MySeq extends Seq[MyBound] - - object Test { - def g[B](x: Bound[B]) = () - - def f1(x: Any) = x match { case SubHK(xs) => xs } - def f2[B <: Bound[B], CC[X] <: Traversable[X]](sub: SubHK[B, CC]): CC[B] = sub match { case SubHK(xs) => xs } - def f3 = g(f1(SubHK(new MySeq)).head) - def f4 = g(f2(SubHK(new MySeq)).head) - } -} diff --git a/test/pending/pos/sig/sigs.java b/test/pending/pos/sig/sigs.java deleted file mode 100644 index ddf8ec45b0..0000000000 --- a/test/pending/pos/sig/sigs.java +++ /dev/null @@ -1,6 +0,0 @@ -package test; -class Test extends T { - Inner i = new Inner(); - String x = foo("abc"); - String y = i.bar("abc"); -} diff --git a/test/pending/pos/sig/sigs.scala b/test/pending/pos/sig/sigs.scala deleted file mode 100644 index bdb72a09bb..0000000000 --- a/test/pending/pos/sig/sigs.scala +++ /dev/null @@ -1,10 +0,0 @@ -package test -class T { - def foo[T <: String](x: T): T = x - def bar[T](x: T): T = x - class Inner { - def foo[T](x: T): T = x - def bar[T](x: T): T = x - } -} - diff --git a/test/pending/pos/sig/sigtest.scala b/test/pending/pos/sig/sigtest.scala deleted file mode 100644 index 1d091390f7..0000000000 --- a/test/pending/pos/sig/sigtest.scala +++ /dev/null @@ -1,3 +0,0 @@ -object Test extends T with Application { - val x: String = foo("abc") -} diff --git a/test/pending/pos/t0621.scala b/test/pending/pos/t0621.scala deleted file mode 100644 index 1d2531c4bd..0000000000 --- a/test/pending/pos/t0621.scala +++ /dev/null @@ -1,7 +0,0 @@ -object Test { - val x1 : List[T] forSome { type T } = List(42) - val w1 = x1 match { case y : List[u] => ((z : u) => z)(y.head) } - - val x2 : T forSome { type T } = 42 - val w2 = x2 match { case y : u => ((z : u) => z)(y) } -} diff --git a/test/pending/pos/t1336.scala b/test/pending/pos/t1336.scala deleted file mode 100644 index 63967985c7..0000000000 --- a/test/pending/pos/t1336.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Foo { - def foreach( f : ((Int,Int)) => Unit ) { - println("foreach") - f(1,2) - } - - for( (a,b) <- this ) { - println((a,b)) - } -} diff --git a/test/pending/pos/t1476.scala b/test/pending/pos/t1476.scala deleted file mode 100644 index 1f8e95c28f..0000000000 --- a/test/pending/pos/t1476.scala +++ /dev/null @@ -1,23 +0,0 @@ -abstract class Module { - def moduleDemands(): List[Module] -} - -object Test { - new Module { owner: Module => - def moduleDemands() = Nil - - val a = new Module { def moduleDemands(): List[Module] = Nil } - val b = new Module { def moduleDemands(): List[Module] = owner :: c :: Nil } - val c = new Module { def moduleDemands(): List[Module] = owner :: a :: Nil } - } -} - -object Test2 { - new Module { owner => - def moduleDemands() = Nil - - val a = new Module { def moduleDemands(): List[Module] = Nil } - val b = new Module { def moduleDemands(): List[Module] = owner :: c :: Nil } - val c = new Module { def moduleDemands(): List[Module] = owner :: a :: Nil } - } -} diff --git a/test/pending/pos/t1786.scala b/test/pending/pos/t1786.scala deleted file mode 100644 index 16ce4301bc..0000000000 --- a/test/pending/pos/t1786.scala +++ /dev/null @@ -1,27 +0,0 @@ -/** This a consequence of the current type checking algorithm, where bounds are checked only after variables are instantiated. - * I believe this will change once we go to constraint-based type inference. - * Alternatively, we can pursue a more extensive fix to SI-6169 - * - * The below code shows a compiler flaw in that the wildcard "_" as value for a bounded type parameter either - * breaks the boundary - as it result in Any - or doesn't evaluate to the boundary (as I'd hoped it to be). -*/ - -class SomeClass(val intValue:Int) -class MyClass[T <: SomeClass](val myValue:T) -class Flooz[A >: Null <: SomeClass, T >: Null <: A](var value: T) - -class A { - def f1(i:MyClass[_]) = i.myValue.intValue - def f2(i:MyClass[_ <: SomeClass]) = i.myValue.intValue - // def f3[T](i: MyClass[T]) = i.myValue.intValue - def f4[T <: SomeClass](i: MyClass[T]) = i.myValue.intValue - // def f5[T >: Null](i: MyClass[T]) = i.myValue.intValue - // def f6[T >: Null <: String](i: MyClass[T]) = i.myValue.intValue + i.myValue.charAt(0) - - // def g1[A, T](x: Flooz[A, T]) = { x.value = null ; x.value.intValue } - def g2(x: Flooz[_, _]) = { x.value = null ; x.value.intValue } - - class MyClass2(x: MyClass[_]) { val p = x.myValue.intValue } - // class MyClass3[T <: String](x: MyClass[T]) { val p = x.myValue.intValue + x.myValue.length } - // class MyClass4[T >: Null](x: MyClass[T]) { val p = x.myValue.intValue } -} diff --git a/test/pending/pos/t2071.scala b/test/pending/pos/t2071.scala deleted file mode 100644 index a384cdfd3b..0000000000 --- a/test/pending/pos/t2071.scala +++ /dev/null @@ -1,21 +0,0 @@ -/** - * We still have to evaluate whether we will permit existentials - * with cross type dependencies. My current reaction would be no. - * Ticket stays open until a decision is made. - */ -trait Iterable[+S] -trait Box[U] - -trait A { - type T <: Iterable[S] forSome { type S <: Box[U]; type U } -} - -trait B extends A { - type T <: Iterable[S] forSome { type S <: Box[U]; type U } -} -/* -But according to SLS, 3.5.1 Type Equivalence: Two existential types (ยง3.2.10) are equivalent if they have the same number of quantifiers, and, after renaming one list of type quantifiers by another, the quantified types as well as lower and upper bounds of corresponding quantifiers are equivalent. - -So, every existential type must be equivalent to (and conform to) itself. -Attachments -*/ diff --git a/test/pending/pos/t2173.scala b/test/pending/pos/t2173.scala deleted file mode 100644 index cf1913d88b..0000000000 --- a/test/pending/pos/t2173.scala +++ /dev/null @@ -1,12 +0,0 @@ -class A[+U >: Null] { - type R[+X >: Null] = X - type O[+X] = A[R[X]] -} - -// with the following error: -// -// type arguments [A.this.R[X]] do not conform to class A's type parameter bounds [+U >: Null] -// -// However, because type R[+X>:Null] is identical to X, it should carry X bounds and R[X] lower bound should be known to be X's lower bound, i.e. Null. -// -// The same problem occurs with upper bounds. diff --git a/test/pending/pos/t3943/Outer_1.java b/test/pending/pos/t3943/Outer_1.java deleted file mode 100644 index 56c8cc7f85..0000000000 --- a/test/pending/pos/t3943/Outer_1.java +++ /dev/null @@ -1,14 +0,0 @@ -public class Outer_1<E> { - abstract class Inner { - abstract public void foo(E e); - } -} - -class Child extends Outer_1<String> { - // the implicit prefix for Inner is Outer<E> instead of Outer<String> - public Inner getInner() { - return new Inner() { - public void foo(String e) { System.out.println("meh "+e); } - }; - } -} diff --git a/test/pending/pos/t3943/test_2.scala b/test/pending/pos/t3943/test_2.scala deleted file mode 100644 index a19db8b226..0000000000 --- a/test/pending/pos/t3943/test_2.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Test extends App { - val x: Child = new Child - x.getInner.foo("meh") -// ^ -// error: type mismatch; -// found : java.lang.String("meh") -// required: E -} diff --git a/test/pending/pos/t4012.scala b/test/pending/pos/t4012.scala deleted file mode 100644 index 9b8a1b0dbe..0000000000 --- a/test/pending/pos/t4012.scala +++ /dev/null @@ -1,7 +0,0 @@ -trait C1[+A] { - def head: A = sys.error("") -} -trait C2[@specialized +A] extends C1[A] { - override def head: A = super.head -} -class C3 extends C2[Char]
\ No newline at end of file diff --git a/test/pending/pos/t4123.scala b/test/pending/pos/t4123.scala deleted file mode 100644 index 82ab16b4e4..0000000000 --- a/test/pending/pos/t4123.scala +++ /dev/null @@ -1,14 +0,0 @@ -// /scala/trac/4123/a.scala -// Sun Feb 19 00:08:53 PST 2012 - -trait Iter[@specialized(Byte) +A] extends Iterator[A] { - self => - - override def map[B](f: (A) => B) = super.map(f) -} - -class ByteIter extends Iter[Byte] { - var i = 0 - def hasNext = i < 3 - def next = { i += 1 ; i.toByte } -}
\ No newline at end of file diff --git a/test/pending/pos/t4436.scala b/test/pending/pos/t4436.scala deleted file mode 100644 index acbf0beae6..0000000000 --- a/test/pending/pos/t4436.scala +++ /dev/null @@ -1,3 +0,0 @@ -trait Chunk[@specialized +A] { - def bippy[@specialized B >: A](e: B): Chunk[B] -}
\ No newline at end of file diff --git a/test/pending/pos/t4541.scala b/test/pending/pos/t4541.scala deleted file mode 100644 index c6d9672cc5..0000000000 --- a/test/pending/pos/t4541.scala +++ /dev/null @@ -1,10 +0,0 @@ -@SerialVersionUID(1L) -final class SparseArray[@specialized T](private var data : Array[T]) extends Serializable { - def use(inData : Array[T]) = { - data = inData; - } - - def set(that : SparseArray[T]) = { - use(that.data.clone) - } -}
\ No newline at end of file diff --git a/test/pending/pos/t4606.scala b/test/pending/pos/t4606.scala deleted file mode 100644 index f4e5058483..0000000000 --- a/test/pending/pos/t4606.scala +++ /dev/null @@ -1,29 +0,0 @@ -object t4606 { - class A(var x: Int) - class B(x: Int) extends A(x) - trait C { self: B => - def foo = x - def bar = self.x - def baz = { - val b: B = self - b.x - } - } - - object Toto extends App { - val x = new B(10) with C - println(x.foo) // 10 - println(x.bar) // 10 - println(x.baz) // 10 - println(x.x) // 10 - } -} - -object t3194 { - class A(var x: Int) - class B(x: Int) extends A(x) { - self: A => - - def update(z: Int) = this.x = z - } -}
\ No newline at end of file diff --git a/test/pending/pos/t4612.scala b/test/pending/pos/t4612.scala deleted file mode 100644 index a93c12ef01..0000000000 --- a/test/pending/pos/t4612.scala +++ /dev/null @@ -1,15 +0,0 @@ -class CyclicReferenceCompilerBug { - trait Trait[A] { - def foo: A - } - - class Class extends Trait[Class] { - def foo = new Class - - trait OtherTrait extends Trait[OtherTrait] { - self: Class => - - def foo = new Class - } - } -} diff --git a/test/pending/pos/t4683.scala b/test/pending/pos/t4683.scala deleted file mode 100644 index 7af7024159..0000000000 --- a/test/pending/pos/t4683.scala +++ /dev/null @@ -1,11 +0,0 @@ - - - - -class DelayedInitTest { - def a = () - class B extends DelayedInit { - a - def delayedInit(body: => Unit) = () - } -} diff --git a/test/pending/pos/t4695/T_1.scala b/test/pending/pos/t4695/T_1.scala deleted file mode 100644 index 70fb1a7f21..0000000000 --- a/test/pending/pos/t4695/T_1.scala +++ /dev/null @@ -1,4 +0,0 @@ -package foo - -class Bar { } -package object Bar { } diff --git a/test/pending/pos/t4695/T_2.scala b/test/pending/pos/t4695/T_2.scala deleted file mode 100644 index 70fb1a7f21..0000000000 --- a/test/pending/pos/t4695/T_2.scala +++ /dev/null @@ -1,4 +0,0 @@ -package foo - -class Bar { } -package object Bar { } diff --git a/test/pending/pos/t4787.scala b/test/pending/pos/t4787.scala deleted file mode 100644 index cf3fe93c50..0000000000 --- a/test/pending/pos/t4787.scala +++ /dev/null @@ -1,4 +0,0 @@ -trait MatrixImpl[@specialized A, @specialized B] { - def mapTo[ A2, B2, That <: MatrixImpl[A2, B2]](that: That)(f: A => A2) { - } -} diff --git a/test/pending/pos/t4790.scala b/test/pending/pos/t4790.scala deleted file mode 100644 index e451fe80ab..0000000000 --- a/test/pending/pos/t4790.scala +++ /dev/null @@ -1,4 +0,0 @@ -package spectest { - class Sp[@specialized A, B](val a: A, val b: B) { } - class Fsp[@specialized A, B](a: A, b: B) extends Sp(a,b) { def ab = (a,b) } -} diff --git a/test/pending/pos/t5082.scala b/test/pending/pos/t5082.scala deleted file mode 100644 index 20a6cfc55f..0000000000 --- a/test/pending/pos/t5082.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Test { - sealed trait A - case object A1 extends A -} - -trait Something[T] - -case class Test() extends Something[Test.A] diff --git a/test/pending/pos/t5231.scala b/test/pending/pos/t5231.scala deleted file mode 100644 index 77e6631ebb..0000000000 --- a/test/pending/pos/t5231.scala +++ /dev/null @@ -1,18 +0,0 @@ -object Client { - sealed trait ConfigLike { - def clientID: Int - } - - object Config { - def apply() : ConfigBuilder = new ConfigBuilder() - implicit def build( cb: ConfigBuilder ) : Config = cb.build - } - - final class Config private[Client]( val clientID: Int ) - extends ConfigLike - - final class ConfigBuilder private () extends ConfigLike { - var clientID: Int = 0 - def build : Config = new Config( clientID ) - } -} diff --git a/test/pending/pos/t5265.scala b/test/pending/pos/t5265.scala deleted file mode 100644 index 3be7d2187e..0000000000 --- a/test/pending/pos/t5265.scala +++ /dev/null @@ -1,21 +0,0 @@ -import java.util.Date - -trait TDate - -trait TT[A1,T1] - -trait TTFactory[F,G] { - def create(f: F) : TT[F,G] - def sample: F -} - -object Impls { - - // If the c1 is declared before c2, it compiles fine - implicit def c2(s: Date) = c1.create(s) - - implicit val c1 = new TTFactory[Date,TDate] { - def create(v: Date): TT[Date,TDate] = sys.error("") - def sample = new Date - } -}
\ No newline at end of file diff --git a/test/pending/pos/t5400.scala b/test/pending/pos/t5400.scala deleted file mode 100644 index cb4be4bde5..0000000000 --- a/test/pending/pos/t5400.scala +++ /dev/null @@ -1,14 +0,0 @@ -trait TFn1B { - type In - type Out - type Apply[T <: In] <: Out -} - -trait TFn1[I, O] extends TFn1B { - type In = I - type Out = O -} - -trait >>[F1 <: TFn1[_, _], F2 <: TFn1[_, _]] extends TFn1[F1#In, F2#Out] { - type Apply[T] = F2#Apply[F1#Apply[T]] -} diff --git a/test/pending/pos/t5459.scala b/test/pending/pos/t5459.scala deleted file mode 100644 index 971e6f896d..0000000000 --- a/test/pending/pos/t5459.scala +++ /dev/null @@ -1,48 +0,0 @@ -trait A1 -trait A2 -trait A3 -trait L1 extends A1 with A2 with A3 - -object Test { - trait T1[-A <: A1] - trait T2[-A >: L1] - trait T3[ A <: A1] - trait T4[ A >: L1] - trait T5[+A <: A1] - trait T6[+A >: L1] - - def f1(x: T1[_]) = x - def f2(x: T2[_]) = x - def f3(x: T3[_]) = x - def f4(x: T4[_]) = x - def f5(x: T5[_]) = x - def f6(x: T6[_]) = x - // a.scala:22: error: type arguments [Any] do not conform to trait T5's type parameter bounds [+A <: A1] - // def f5(x: T5[_]) = x - // ^ - - def g1(x: T1[_ <: A1]) = x - def g2(x: T2[_ >: L1]) = x - def g3(x: T3[_ <: A1]) = x - def g4(x: T4[_ >: L1]) = x - def g5(x: T5[_ <: A1]) = x - def g6(x: T6[_ >: L1]) = x - - def q1(x: T1[_ >: L1]) = x - def q2(x: T2[_ <: A1]) = x - def q3(x: T3[_ >: L1]) = x - def q4(x: T4[_ <: A1]) = x - def q5(x: T5[_ >: L1]) = x - def q6(x: T6[_ <: A1]) = x - // a.scala:41: error: type arguments [Any] do not conform to trait T5's type parameter bounds [+A <: A1] - // def q5(x: T5[_ >: L1]) = x - // ^ - // two errors found - - def h1(x: T1[_ >: L1 <: A1]) = x - def h2(x: T2[_ >: L1 <: A1]) = x - def h3(x: T3[_ >: L1 <: A1]) = x - def h4(x: T4[_ >: L1 <: A1]) = x - def h5(x: T5[_ >: L1 <: A1]) = x - def h6(x: T6[_ >: L1 <: A1]) = x -} diff --git a/test/pending/pos/t5503.flags b/test/pending/pos/t5503.flags deleted file mode 100644 index e8fb65d50c..0000000000 --- a/test/pending/pos/t5503.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/test/pending/pos/t5503.scala b/test/pending/pos/t5503.scala deleted file mode 100644 index 8a1925df1f..0000000000 --- a/test/pending/pos/t5503.scala +++ /dev/null @@ -1,18 +0,0 @@ -trait A { - type Type - type MethodType <: Type - - val MethodType: MethodTypeExtractor = null - - abstract class MethodTypeExtractor { - def unapply(tpe: MethodType): Option[(Any, Any)] - } -} - -object Test { - val a: A = null - - def foo(tpe: a.Type) = tpe match { - case a.MethodType(_, _) => - } -}
\ No newline at end of file diff --git a/test/pending/pos/t5521.scala b/test/pending/pos/t5521.scala deleted file mode 100644 index dc025d0945..0000000000 --- a/test/pending/pos/t5521.scala +++ /dev/null @@ -1,3 +0,0 @@ -class Foo { type Bar } - -class Quux(val foo: Foo)(val bar: foo.Bar)
\ No newline at end of file diff --git a/test/pending/pos/t5534.scala b/test/pending/pos/t5534.scala deleted file mode 100644 index 834c4fd68d..0000000000 --- a/test/pending/pos/t5534.scala +++ /dev/null @@ -1,11 +0,0 @@ -object Phrase extends Enumeration { - type Phrase = Value - val PHRASE1 = Value("My phrase 1") - val PHRASE2 = Value("My phrase 2") -} - -class Entity(text:String) - -object Test { - val myMapWithPhrases = Phrase.values.map(p => (p -> new Entity(p.toString))).toMap -}
\ No newline at end of file diff --git a/test/pending/pos/t5559.scala b/test/pending/pos/t5559.scala deleted file mode 100644 index 586e52cd4f..0000000000 --- a/test/pending/pos/t5559.scala +++ /dev/null @@ -1,23 +0,0 @@ - - - - -object Test { - - class Inv[T] - - def foo[S](interface: Inv[_ >: S], implementation: Inv[S]) {} - - def bar[R, T <: R](interface: Inv[R], impl: Inv[T]) { - //foo[T](interface, impl) - foo(interface, impl) // Compilation Error - // Inv[R] <: Inv[_ >: S] - // Inv[T] <: Inv[S] - // ---------------------- - // R >: S - // T == S - } - -} - - diff --git a/test/pending/pos/t5564.scala b/test/pending/pos/t5564.scala deleted file mode 100644 index 1783a903ed..0000000000 --- a/test/pending/pos/t5564.scala +++ /dev/null @@ -1,5 +0,0 @@ -trait C - -class Foo[@specialized(Int) T, A] { - def bar[B >: A <: C]: T = ??? -} diff --git a/test/pending/pos/t5579.scala b/test/pending/pos/t5579.scala deleted file mode 100644 index a1ee077fe7..0000000000 --- a/test/pending/pos/t5579.scala +++ /dev/null @@ -1,29 +0,0 @@ -import language.existentials - -class Result[+A] - -case class Success[A](x: A) extends Result[A] - -class Apply[A] - -object Apply { - def apply[A](f: Int => Result[A]): Apply[A] = new Apply[A] -} - -object TestUnit { - //Error is here: - def goo = Apply { i => - i match { - case 1 => Success(Some(1)) - case _ => Success(None) - } - } - - //If type is defined explicitly (which I wanted from compiler to infer), then all is ok - def foo = Apply[t forSome { type t >: Some[Int] with None.type <: Option[Int] }] { i => - i match { - case 1 => Success(Some(1)) - case _ => Success(None) - } - } -} diff --git a/test/pending/pos/t5585.scala b/test/pending/pos/t5585.scala deleted file mode 100644 index 5d3eb86111..0000000000 --- a/test/pending/pos/t5585.scala +++ /dev/null @@ -1,18 +0,0 @@ -class Result[+A] - -case class Success[A](x: A) extends Result[A] - -class Apply[A] - -object Apply { - def apply[A](f: Int => Result[A]): Apply[A] = new Apply[A] -} - -object TestUnit { - def goo : Apply[Option[Int]] = Apply { i => - val p = i match { - case 1 => Success(Some(1)) - case _ => Success(None) - } - } -}
\ No newline at end of file diff --git a/test/pending/pos/t5589.scala b/test/pending/pos/t5589.scala deleted file mode 100644 index 69cbb20391..0000000000 --- a/test/pending/pos/t5589.scala +++ /dev/null @@ -1,22 +0,0 @@ -class A { - // First three compile. - def f1(x: Either[Int, String]) = x.right map (y => y) - def f2(x: Either[Int, String]) = for (y <- x.right) yield y - def f3(x: Either[Int, (String, Int)]) = x.right map { case (y1, y2) => (y1, y2) } - // Last one fails. - def f4(x: Either[Int, (String, Int)]) = for ((y1, y2) <- x.right) yield ((y1, y2)) -/** -./a.scala:5: error: constructor cannot be instantiated to expected type; - found : (T1, T2) - required: Either[Nothing,(String, Int)] - def f4(x: Either[Int, (String, Int)]) = for ((y1, y2) <- x.right) yield ((y1, y2)) - ^ -./a.scala:5: error: not found: value y1 - def f4(x: Either[Int, (String, Int)]) = for ((y1, y2) <- x.right) yield ((y1, y2)) - ^ -./a.scala:5: error: not found: value y2 - def f4(x: Either[Int, (String, Int)]) = for ((y1, y2) <- x.right) yield ((y1, y2)) - ^ -three errors found -**/ -} diff --git a/test/pending/pos/t5712.scala b/test/pending/pos/t5712.scala deleted file mode 100644 index 31f365028a..0000000000 --- a/test/pending/pos/t5712.scala +++ /dev/null @@ -1,14 +0,0 @@ -import scala.tools.nsc._ - -object Test { - - // works - def mkReifier(global: Global)(typer: global.analyzer.Typer) = typer - -/* -<console>:10: error: not found: value global - class Reifier(global: Global)(typer: global.analyzer.Typer) { } -*/ - class Reifier(global: Global)(typer: global.analyzer.Typer) { } - -} diff --git a/test/pending/pos/t5877.scala b/test/pending/pos/t5877.scala deleted file mode 100644 index b77605f7f2..0000000000 --- a/test/pending/pos/t5877.scala +++ /dev/null @@ -1,5 +0,0 @@ -package foo { } - -package object foo { - implicit class Foo(val s: String) { } -} diff --git a/test/pending/pos/t5954/T_1.scala b/test/pending/pos/t5954/T_1.scala deleted file mode 100644 index 0064c596b6..0000000000 --- a/test/pending/pos/t5954/T_1.scala +++ /dev/null @@ -1,8 +0,0 @@ -package p { - package base { - class X - } - package object base { - case class B() - } -} diff --git a/test/pending/pos/t5954/T_2.scala b/test/pending/pos/t5954/T_2.scala deleted file mode 100644 index 0064c596b6..0000000000 --- a/test/pending/pos/t5954/T_2.scala +++ /dev/null @@ -1,8 +0,0 @@ -package p { - package base { - class X - } - package object base { - case class B() - } -} diff --git a/test/pending/pos/t5954/T_3.scala b/test/pending/pos/t5954/T_3.scala deleted file mode 100644 index 0064c596b6..0000000000 --- a/test/pending/pos/t5954/T_3.scala +++ /dev/null @@ -1,8 +0,0 @@ -package p { - package base { - class X - } - package object base { - case class B() - } -} diff --git a/test/pending/pos/t6161.scala b/test/pending/pos/t6161.scala deleted file mode 100644 index 5783cc85f2..0000000000 --- a/test/pending/pos/t6161.scala +++ /dev/null @@ -1,22 +0,0 @@ -object t6161 { - trait N { - type Name - } - - trait N1 extends N { - class Name { - type ThisNameType <: Name - def encode: ThisNameType = ??? - } - } - - trait S { - self: N => // change to N1 and it compiles - type NameType <: Name - } - - object g extends S with N1 - - val n1: g.NameType = ??? - val n2: g.Name = n1.encode -} diff --git a/test/pending/pos/t6225.scala b/test/pending/pos/t6225.scala deleted file mode 100644 index d7dff3c419..0000000000 --- a/test/pending/pos/t6225.scala +++ /dev/null @@ -1,11 +0,0 @@ -package library.x { - class X { - class Foo - implicit val foo = new Foo - } -} -package library { package object x extends X } -package app { - import library.x._ - object App { implicitly[Foo] } -} diff --git a/test/pending/pos/t7234.scala b/test/pending/pos/t7234.scala deleted file mode 100644 index 59a233d835..0000000000 --- a/test/pending/pos/t7234.scala +++ /dev/null @@ -1,15 +0,0 @@ -trait Main { - trait A { - type B - } - trait C { - def c(a: A, x: Int = 0)(b: a.B) - } - def c: C - def d(a: A, x: Int = 0)(b: a.B) - - def ok1(a: A)(b: a.B) = c.c(a, 42)(b) - def ok2(a: A)(b: a.B) = d(a)(b) - - def fail(a: A)(b: a.B) = c.c(a)(b) -} diff --git a/test/pending/pos/t7234b.scala b/test/pending/pos/t7234b.scala deleted file mode 100644 index fee98e87a8..0000000000 --- a/test/pending/pos/t7234b.scala +++ /dev/null @@ -1,20 +0,0 @@ -trait Main { - trait A { - type B - def b: B - } - trait C { - def c(a: A, x: Int = 0)(b: => a.B, bs: a.B*) - def d(a: A = null, x: Int = 0)(b1: => a.B = a.b, b2: a.B = a.b) - } - def c: C - def ok(a: A)(b: a.B) = c.c(a, 42)(b) - def fail(a: A)(b: a.B) = c.c(a)(b) - def fail2(a: A)(b: a.B) = c.c(a)(b, b) - def fail3(a: A)(b: a.B) = c.c(a)(b, Seq[a.B](b): _*) - - def fail4(a: A)(b: a.B) = c.d(a)() - def fail5(a: A)(b: a.B) = c.d(a)(b1 = a.b) - def fail6(a: A)(b: a.B) = c.d(a)(b2 = a.b) - def fail7(a: A)(b: a.B) = c.d()() -} diff --git a/test/pending/pos/t7778/Foo_1.java b/test/pending/pos/t7778/Foo_1.java deleted file mode 100644 index 65431ffd46..0000000000 --- a/test/pending/pos/t7778/Foo_1.java +++ /dev/null @@ -1,6 +0,0 @@ -import java.util.concurrent.Callable; - -public abstract class Foo_1<T> implements Callable<Foo_1<Object>.Inner> { - public abstract class Inner { - } -} diff --git a/test/pending/pos/t7778/Test_2.scala b/test/pending/pos/t7778/Test_2.scala deleted file mode 100644 index 306303a99e..0000000000 --- a/test/pending/pos/t7778/Test_2.scala +++ /dev/null @@ -1,3 +0,0 @@ -class Test { - null: Foo_1[_] -} diff --git a/test/pending/pos/t8128b.scala b/test/pending/pos/t8128b.scala deleted file mode 100644 index dd44a25a90..0000000000 --- a/test/pending/pos/t8128b.scala +++ /dev/null @@ -1,18 +0,0 @@ -class Optiony[X] { def isEmpty = true; def get: X = ??? } -class Seqy[X] { def head: X = ???; def length = 0; def apply(i: Int): X = ??? } - -object G { - def unapply(m: Any): Optiony[_] = ??? -} - -object H { - def unapplySeq(m: Any): Optiony[Seqy[_]] = ??? -} - -object Test { - (0: Any) match { - case G(v) => v - case H(v) => v - case _ => - } -} diff --git a/test/pending/pos/t8363b.scala b/test/pending/pos/t8363b.scala deleted file mode 100644 index 393e2a0237..0000000000 --- a/test/pending/pos/t8363b.scala +++ /dev/null @@ -1,7 +0,0 @@ -class C(a: Any) -class Test { - def foo: Any = { - def form = 0 - class C1 extends C({def x = form; ()}) - } -} diff --git a/test/pending/pos/those-kinds-are-high.scala b/test/pending/pos/those-kinds-are-high.scala deleted file mode 100644 index 78367cb746..0000000000 --- a/test/pending/pos/those-kinds-are-high.scala +++ /dev/null @@ -1,96 +0,0 @@ -class A { - trait Container[+T] - trait Template[+CC[X] <: Container[X]] - - class C1[T] extends Template[C1] with Container[T] - class C2[T] extends Template[C2] with Container[T] - - /** Target expression: - * List(new C1[String], new C2[String]) - */ - - // Here's what would ideally be inferred. - // - // scala> :type List[Template[Container] with Container[String]](new C1[String], new C2[String]) - // List[Template[Container] with Container[java.lang.String]] - // - // Here's what it does infer. - // - // scala> :type List(new C1[String], new C2[String]) - // <console>:8: error: type mismatch; - // found : C1[String] - // required: Container[String] with Template[Container[Any] with Template[Container[Any] with Template[Any] with ScalaObject] with ScalaObject] with ScalaObject - // List(new C1[String], new C2[String]) - // ^ - // - // Simplified, the inferred type is: - // - // List[Container[String] with Template[Container[Any] with Template[Container[Any] with Template[Any]]] - // - // *** Update 2/24/2012 - // - // Hey, now there are polytypes in the inferred type. - // Not sure if that is progress or regress. - // - // test/pending/pos/those-kinds-are-high.scala:36: error: type mismatch; - // found : C1[String] - // required: ScalaObject with Container[String] with Template[ScalaObject with Container with Template[ScalaObject with Container with Template[[X]Container[X]]]] - // def fFail = List(new C1[String], new C2[String]) - // ^ - // test/pending/pos/those-kinds-are-high.scala:36: error: type mismatch; - // found : C2[String] - // required: ScalaObject with Container[String] with Template[ScalaObject with Container with Template[ScalaObject with Container with Template[[X]Container[X]]]] - // def fFail = List(new C1[String], new C2[String]) - // ^ - // two errors found - - /** Working version explicitly typed. - */ - def fExplicit = List[Template[Container] with Container[String]](new C1[String], new C2[String]) - - // nope - def fFail = List(new C1[String], new C2[String]) -} - - -trait Other { - trait GenBar[+A] - trait Bar[+A] extends GenBar[A] - trait Templ[+A, +CC[X] <: GenBar[X]] - - abstract class CC1[+A] extends Templ[A, CC1] with Bar[A] - abstract class CC2[+A] extends Templ[A, CC2] with Bar[A] - - // Compiles - class A1 { - abstract class BarFactory[CC[X] <: Bar[X]] - - def f(x: Boolean) = if (x) (null: BarFactory[CC1]) else (null: BarFactory[CC2]) - } - - // Fails - only difference is CC covariant. - class A2 { - abstract class BarFactory[+CC[X] <: Bar[X]] - - def f(x: Boolean) = if (x) (null: BarFactory[CC1]) else (null: BarFactory[CC2]) - // c.scala:23: error: kinds of the type arguments (Bar with Templ[Any,Bar]) do not conform to the expected kinds of the type parameters (type CC) in class BarFactory. - // Bar with Templ[Any,Bar]'s type parameters do not match type CC's expected parameters: - // <empty> has no type parameters, but type CC has one - // def f(x: Boolean) = if (x) (null: BarFactory[CC1]) else (null: BarFactory[CC2]) - // ^ - // one error found - } - - // Compiles - CC contravariant. - class A3 { - abstract class BarFactory[-CC[X] <: Bar[X]] // with Templ[X, CC]] - - def f(x: Boolean) = if (x) (null: BarFactory[CC1]) else (null: BarFactory[CC2]) - // c.scala:23: error: kinds of the type arguments (Bar with Templ[Any,Bar]) do not conform to the expected kinds of the type parameters (type CC) in class BarFactory. - // Bar with Templ[Any,Bar]'s type parameters do not match type CC's expected parameters: - // <empty> has no type parameters, but type CC has one - // def f(x: Boolean) = if (x) (null: BarFactory[CC1]) else (null: BarFactory[CC2]) - // ^ - // one error found - } -} diff --git a/test/pending/pos/treecheckers.flags b/test/pending/pos/treecheckers.flags deleted file mode 100644 index 5319681590..0000000000 --- a/test/pending/pos/treecheckers.flags +++ /dev/null @@ -1 +0,0 @@ --Ycheck:all
\ No newline at end of file diff --git a/test/pending/pos/treecheckers/c1.scala b/test/pending/pos/treecheckers/c1.scala deleted file mode 100644 index b936839039..0000000000 --- a/test/pending/pos/treecheckers/c1.scala +++ /dev/null @@ -1,12 +0,0 @@ -object Test1 { - def f[T](xs: Array[T]): Array[T] = xs match { case xs => xs } - // [check: patmat] The symbol, tpe or info of tree `(x) : Array[T]` refers to a out-of-scope symbol, type T. tree.symbol.ownerChain: value x - // [check: patmat] The symbol, tpe or info of tree `(x) : Array[T]` refers to a out-of-scope symbol, type T. tree.symbol.ownerChain: value x - - def g[T](xs: Array[T]): Array[T] = { - val x1: Array[T] = xs - def case4() = matchEnd3(x1) - def matchEnd3(x: Array[T]) = x - case4() - } -} diff --git a/test/pending/pos/treecheckers/c2.scala b/test/pending/pos/treecheckers/c2.scala deleted file mode 100644 index c893a5c922..0000000000 --- a/test/pending/pos/treecheckers/c2.scala +++ /dev/null @@ -1 +0,0 @@ -class Test2(val valueVal: Int) extends AnyVal diff --git a/test/pending/pos/treecheckers/c3.scala b/test/pending/pos/treecheckers/c3.scala deleted file mode 100644 index e480bbfb08..0000000000 --- a/test/pending/pos/treecheckers/c3.scala +++ /dev/null @@ -1,8 +0,0 @@ -import scala.collection.mutable.ArrayOps - -object Test3 { - implicit def genericArrayOps[T](xs: Array[T]): ArrayOps[T] = (xs match { - case x: Array[AnyRef] => refArrayOps[AnyRef](x) - case x: Array[Boolean] => booleanArrayOps(x) - }).asInstanceOf[ArrayOps[T]] -} diff --git a/test/pending/pos/treecheckers/c4.scala b/test/pending/pos/treecheckers/c4.scala deleted file mode 100644 index 2328131770..0000000000 --- a/test/pending/pos/treecheckers/c4.scala +++ /dev/null @@ -1,9 +0,0 @@ -sealed trait Message[+A] -class Script[A] extends Message[A] { - def iterator: Iterator[Message[A]] = ??? -} - -trait Test4[A] { - def f(cmd: Message[A]): Iterator[A] = cmd match { case s: Script[t] => s.iterator flatMap f } - def g(cmd: Message[A]) = cmd match { case s: Script[t] => s } -} diff --git a/test/pending/pos/treecheckers/c5.scala b/test/pending/pos/treecheckers/c5.scala deleted file mode 100644 index 43cbb65d74..0000000000 --- a/test/pending/pos/treecheckers/c5.scala +++ /dev/null @@ -1,3 +0,0 @@ -trait Factory[CC[X] <: Traversable[X]] - -object Test5 extends Factory[Traversable] diff --git a/test/pending/pos/treecheckers/c6.scala b/test/pending/pos/treecheckers/c6.scala deleted file mode 100644 index 8283655f3a..0000000000 --- a/test/pending/pos/treecheckers/c6.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test6 { - import scala.reflect.ClassTag - def f[T: ClassTag] = implicitly[ClassTag[T]].runtimeClass match { case x => x } -} diff --git a/test/pending/pos/unappgadteval.scala b/test/pending/pos/unappgadteval.scala deleted file mode 100644 index 89f6cabc43..0000000000 --- a/test/pending/pos/unappgadteval.scala +++ /dev/null @@ -1,77 +0,0 @@ -/** Cleaned up in october 2010 by paulp. - * Hey, we should get this working. - */ - -// Class hierarchy -trait Term[a] - -object Var{ def unapply[a](x:Var[a]) = Some(x.name) } -class Var[a] (val name : String) extends Term[a] - -object Num{ def unapply(x:Num) = Some(x.value) } -class Num (val value : Int) extends Term[Int] - -object Lam{ def unapply[b,c](l: Lam[b,c]) = Some(l.x, l.e) } -class Lam[b, c](val x : Var[b], val e : Term[c]) extends Term[b => c] - -object App{ def unapply[b,c](a: App[b,c]) = Some(a.f, a.e) } -class App[b, c] (val f : Term[b => c], val e : Term[b]) extends Term[c] - -object Suc { def unapply(a: Suc) = true } -class Suc() extends Term[Int => Int] - -// Environments : -abstract class Env { - def apply[a](v: Var[a]): a - def extend[a](v: Var[a], x : a) = new Env { - def apply[b](w: Var[b]): b = w match { - case _ : v.type => x // v eq w, hence a = b - case _ => Env.this.apply(w) - }} -} - -object empty extends Env { - def apply[a](x: Var[a]): a = throw new Error("not found : "+x.name) -} - -object Test { - val v1 = new Var[util.Random]("random") - val v2 = new Var[Int]("Int") - val v3 = new Var[List[String]]("list") - - val anEnv = (empty - .extend(v1, new util.Random) - .extend(v2, 58) - .extend(v3, Nil) - ) - - def eval[a](t: Term[a], env : Env): a = t match { - // First three work - case v : Var[b] => env(v) // a = b - case n @ Num(value) => value // a = Int - case a @ App(f,e) => eval(f, env)(eval(e, env)) // a = c - - // Next one fails like: - // - // found : (Int) => Int - // required: a - case i @ Suc() => { (y: Int) => y + 1 } // a = Int => Int - - // Next one fails like: - // - // error: '=>' expected but '[' found. - // case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c - // ^ - case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c - } - - val f1 = () => eval(v1, anEnv) - val f2 = () => eval(v2, anEnv) - val f3 = () => eval(v3, anEnv) - - def main(args: Array[String]): Unit = { - println(f1()) - println(f2()) - println(f3()) - } -} diff --git a/test/pending/pos/virt.scala b/test/pending/pos/virt.scala deleted file mode 100644 index 99dcd747b2..0000000000 --- a/test/pending/pos/virt.scala +++ /dev/null @@ -1,9 +0,0 @@ -object Virt extends Application { - class Foo { - trait Inner <: { val x : Int = 3 } - } - - class Bar extends Foo { - trait Inner <: { val y : Int = x } - } -} |