diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-02-09 15:46:55 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-02-09 15:46:55 +0000 |
commit | 48b2da016989d127517573fc03bc7be11e1d127d (patch) | |
tree | ef4478906ff2d01188539b4a5113b6a42f589a51 | |
parent | d34d0d5108542f6eb9ec46acb5daadd5ad4fb7ef (diff) | |
download | scala-48b2da016989d127517573fc03bc7be11e1d127d.tar.gz scala-48b2da016989d127517573fc03bc7be11e1d127d.tar.bz2 scala-48b2da016989d127517573fc03bc7be11e1d127d.zip |
Test case uncommented.
-rw-r--r-- | test/files/pos/spec.scala | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/test/files/pos/spec.scala b/test/files/pos/spec.scala index e8df1bb14a..cc060ffe84 100644 --- a/test/files/pos/spec.scala +++ b/test/files/pos/spec.scala @@ -2,59 +2,59 @@ -// class Bar[@specialized(Int, AnyRef) A](a: A) { -// val memb = a -// } +class Bar[@specialized(Int, AnyRef) A](a: A) { + val memb = a +} -// class WithInner[@specialized(Int, AnyRef) A](a: A) { -// class Inner { -// def meth = a -// } -// } +class WithInner[@specialized(Int, AnyRef) A](a: A) { + class Inner { + def meth = a + } +} -// class Baz[@specialized(Int, AnyRef) A, @specialized(Int, AnyRef) B] { -// def ab(a: A, b: B) = (a, b) -// } +class Baz[@specialized(Int, AnyRef) A, @specialized(Int, AnyRef) B] { + def ab(a: A, b: B) = (a, b) +} -// trait Base[@specialized(Int, AnyRef) A] -// class Concrete[@specialized(Int, AnyRef) A] extends Base[A] +trait Base[@specialized(Int, AnyRef) A] +class Concrete[@specialized(Int, AnyRef) A] extends Base[A] -// class WithAnon[@specialized(Int, AnyRef) A](a: A) { -// new AnyRef { -// def foo = a -// } -// } +class WithAnon[@specialized(Int, AnyRef) A](a: A) { + new AnyRef { + def foo = a + } +} -// class Norm { -// def id[@specialized(Int, AnyRef) A](a: A) = a -// } +class Norm { + def id[@specialized(Int, AnyRef) A](a: A) = a +} -// class Qux[@specialized(AnyRef) A] { -// def memb[@specialized(AnyRef) B](a: A, b: B) = (a, b) -// } +class Qux[@specialized(AnyRef) A] { + def memb[@specialized(AnyRef) B](a: A, b: B) = (a, b) +} -// class Foo[@specialized(Int, AnyRef) A](val a: Array[A]) { -// a(0) +class Foo[@specialized(Int, AnyRef) A](val a: Array[A]) { + a(0) -// def id(elem: A) = a(0) = elem -// } + def id(elem: A) = a(0) = elem +} // instantiation and selection object Test { def main(arg: Array[String]) { - // val f = new Foo(new Array[String](5)) - // f.id("") + val f = new Foo(new Array[String](5)) + f.id("") - // val z = new Baz[Int, Double] - // z.ab(1, 1.0) + val z = new Baz[Int, Double] + z.ab(1, 1.0) testspec(new Array[String](5)) testspec(new Array[Int](5)) |