diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/bug122.scala | 8 | ||||
-rw-r--r-- | test/files/pos/bug404.scala | 12 | ||||
-rw-r--r-- | test/files/pos/bug613.scala | 6 | ||||
-rw-r--r-- | test/files/pos/rebind.scala | 10 | ||||
-rw-r--r-- | test/files/run/gadts.scala | 16 |
5 files changed, 25 insertions, 27 deletions
diff --git a/test/files/pos/bug122.scala b/test/files/pos/bug122.scala index cbfdb64def..630e24ce4a 100644 --- a/test/files/pos/bug122.scala +++ b/test/files/pos/bug122.scala @@ -1,4 +1,4 @@ -class L{ - val List(v:int,2) = List(2,v:int); - val Pair(a:int,b:int) = Pair(1,a); -}
\ No newline at end of file +class L { + val List(v:Int, 2) = List(2, v:Int) + val (a:Int, b:Int) = (1, a) +} diff --git a/test/files/pos/bug404.scala b/test/files/pos/bug404.scala index 1b1ce40135..8f5e8bef5e 100644 --- a/test/files/pos/bug404.scala +++ b/test/files/pos/bug404.scala @@ -1,12 +1,12 @@ trait AbsIterator { - type T; - def next: T; + type T + def next: T } class StringIterator extends AbsIterator { - type T = char; - def next = 'a'; + type T = Char + def next = 'a' } trait SyncIterator extends AbsIterator { - abstract override def next: T = super.next; + abstract override def next: T = super.next } -class I extends StringIterator with SyncIterator; +class I extends StringIterator with SyncIterator diff --git a/test/files/pos/bug613.scala b/test/files/pos/bug613.scala index 49071fa806..cf179420f4 100644 --- a/test/files/pos/bug613.scala +++ b/test/files/pos/bug613.scala @@ -1,7 +1,7 @@ class Outer extends Application { - val y: int = 1 + val y: Int = 1 abstract class C { - val x: int + val x: Int } val foo = new C { class I { @@ -13,5 +13,5 @@ class Outer extends Application { object Test extends Application { val o = new Outer - Console.println(o.foo.x) + println(o.foo.x) } diff --git a/test/files/pos/rebind.scala b/test/files/pos/rebind.scala index 61ff0c223e..faedcc9bca 100644 --- a/test/files/pos/rebind.scala +++ b/test/files/pos/rebind.scala @@ -1,13 +1,13 @@ abstract class Foo { class Inner { - def inner: int = 1; + def inner: Int = 1 } - def foo: Inner; + def foo: Inner } trait Bar { - type Inner; - def foo: Inner = foo; + type Inner + def foo: Inner = foo } class Test extends Foo with Bar { - Console.println(foo.inner); + println(foo.inner) } diff --git a/test/files/run/gadts.scala b/test/files/run/gadts.scala index 36d6fc9530..11b094d99a 100644 --- a/test/files/run/gadts.scala +++ b/test/files/run/gadts.scala @@ -1,10 +1,10 @@ -abstract class Term[T]; -case class Lit(x: int) extends Term[int]; -case class Succ(t: Term[int]) extends Term[int]; -case class IsZero(t: Term[int]) extends Term[boolean]; -case class If[T](c: Term[boolean], +abstract class Term[T] +case class Lit(x: Int) extends Term[Int] +case class Succ(t: Term[Int]) extends Term[Int] +case class IsZero(t: Term[Int]) extends Term[Boolean] +case class If[T](c: Term[Boolean], t1: Term[T], - t2: Term[T]) extends Term[T]; + t2: Term[T]) extends Term[T] object Test extends Application { def eval[T](t: Term[T]): T = t match { @@ -13,7 +13,5 @@ object Test extends Application { case IsZero(u) => eval(u) == 0 case If(c, u1, u2) => eval(if (eval(c)) u1 else u2) } - Console.println( - eval(If(IsZero(Lit(1)), Lit(41), Succ(Lit(41))))) + println(eval(If(IsZero(Lit(1)), Lit(41), Succ(Lit(41))))) } - |