diff options
Diffstat (limited to 'tests/pos')
31 files changed, 88 insertions, 88 deletions
diff --git a/tests/pos/SI-7638.scala b/tests/pos/SI-7638.scala index ed581efe9..eea302e17 100644 --- a/tests/pos/SI-7638.scala +++ b/tests/pos/SI-7638.scala @@ -36,16 +36,16 @@ object vectorOrder { * unhandled exception while transforming SI-7638.scala * error: uncaught exception during compilation: java.lang.UnsupportedOperationException * error: java.lang.UnsupportedOperationException: tail of empty list - * at scala.collection.immutable.Nil$.tail(List.scala:339) - * at scala.collection.immutable.Nil$.tail(List.scala:334) - * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$rebindSuper$1.apply(Mixin.scala:123) - * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$rebindSuper$1.apply(Mixin.scala:122) - * at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:207) - * at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:216) - * at scala.tools.nsc.Global.afterPickler(Global.scala:1104) - * at scala.tools.nsc.transform.Mixin.scala$tools$nsc$transform$Mixin$$rebindSuper(Mixin.scala:122) - * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$mixinTraitMembers$1$1.apply(Mixin.scala:339) - * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$mixinTraitMembers$1$1.apply(Mixin.scala:292) + * at scala.collection.immutable.Nil$.tail(List.scala:339) + * at scala.collection.immutable.Nil$.tail(List.scala:334) + * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$rebindSuper$1.apply(Mixin.scala:123) + * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$rebindSuper$1.apply(Mixin.scala:122) + * at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:207) + * at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:216) + * at scala.tools.nsc.Global.afterPickler(Global.scala:1104) + * at scala.tools.nsc.transform.Mixin.scala$tools$nsc$transform$Mixin$$rebindSuper(Mixin.scala:122) + * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$mixinTraitMembers$1$1.apply(Mixin.scala:339) + * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$mixinTraitMembers$1$1.apply(Mixin.scala:292) */ new ArrayVectorOrder[A] { } } diff --git a/tests/pos/SI-7638a.scala b/tests/pos/SI-7638a.scala index 060bd0ffa..7a73c8ea3 100644 --- a/tests/pos/SI-7638a.scala +++ b/tests/pos/SI-7638a.scala @@ -37,16 +37,16 @@ object vectorOrder { * unhandled exception while transforming SI-7638.scala * error: uncaught exception during compilation: java.lang.UnsupportedOperationException * error: java.lang.UnsupportedOperationException: tail of empty list - * at scala.collection.immutable.Nil$.tail(List.scala:339) - * at scala.collection.immutable.Nil$.tail(List.scala:334) - * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$rebindSuper$1.apply(Mixin.scala:123) - * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$rebindSuper$1.apply(Mixin.scala:122) - * at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:207) - * at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:216) - * at scala.tools.nsc.Global.afterPickler(Global.scala:1104) - * at scala.tools.nsc.transform.Mixin.scala$tools$nsc$transform$Mixin$$rebindSuper(Mixin.scala:122) - * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$mixinTraitMembers$1$1.apply(Mixin.scala:339) - * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$mixinTraitMembers$1$1.apply(Mixin.scala:292) + * at scala.collection.immutable.Nil$.tail(List.scala:339) + * at scala.collection.immutable.Nil$.tail(List.scala:334) + * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$rebindSuper$1.apply(Mixin.scala:123) + * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$rebindSuper$1.apply(Mixin.scala:122) + * at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:207) + * at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:216) + * at scala.tools.nsc.Global.afterPickler(Global.scala:1104) + * at scala.tools.nsc.transform.Mixin.scala$tools$nsc$transform$Mixin$$rebindSuper(Mixin.scala:122) + * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$mixinTraitMembers$1$1.apply(Mixin.scala:339) + * at scala.tools.nsc.transform.Mixin$$anonfun$scala$tools$nsc$transform$Mixin$$mixinTraitMembers$1$1.apply(Mixin.scala:292) */ new ArrayVectorOrder[A] { } } diff --git a/tests/pos/java-interop/t2433/Test.scala b/tests/pos/java-interop/t2433/Test.scala index 02fd89b64..02fd89b64 100755..100644 --- a/tests/pos/java-interop/t2433/Test.scala +++ b/tests/pos/java-interop/t2433/Test.scala diff --git a/tests/pos/java-interop/t2940/Error.scala b/tests/pos/java-interop/t2940/Error.scala index 92f08f580..305d8aa4c 100644 --- a/tests/pos/java-interop/t2940/Error.scala +++ b/tests/pos/java-interop/t2940/Error.scala @@ -1,5 +1,5 @@ abstract class Error { - val c: Cycle[_] + val c: Cycle[_] } object Test { diff --git a/tests/pos/java-interop/t2956/t2956.scala b/tests/pos/java-interop/t2956/t2956.scala index 33803874b..33803874b 100755..100644 --- a/tests/pos/java-interop/t2956/t2956.scala +++ b/tests/pos/java-interop/t2956/t2956.scala diff --git a/tests/pos/t0031.scala b/tests/pos/t0031.scala index d4050c818..6070a4683 100644 --- a/tests/pos/t0031.scala +++ b/tests/pos/t0031.scala @@ -7,12 +7,12 @@ object Main { def require[a](precondition: => Boolean)(command: => a): Ensure[a] = if (precondition) new Ensure[a] { - def ensure(postcondition: a => Boolean): a = { - val result = command; - if (postcondition(result)) result - else sys.error("Assertion error") + def ensure(postcondition: a => Boolean): a = { + val result = command; + if (postcondition(result)) result + else sys.error("Assertion error") } - } + } else sys.error("Assertion error"); @@ -22,7 +22,7 @@ object Main { } ensure (result => s contains result); def main(args: Array[String]) = { - val s = List(1, 2); + val s = List(1, 2); Console.println(arb(s)) } diff --git a/tests/pos/t0039.scala b/tests/pos/t0039.scala index 652c606b0..7b51320e2 100644 --- a/tests/pos/t0039.scala +++ b/tests/pos/t0039.scala @@ -1,6 +1,6 @@ abstract class Extensible[A, This <: Extensible[A, This]](x: A, xs: This) { self: This => - def mkObj(x: A, xs: This): This; + def mkObj(x: A, xs: This): This; } class Fixed[A](x: A, xs: Fixed[A]) extends Extensible[A, Fixed[A]](x, xs) { - def mkObj(x: A, xs: Fixed[A]) = new Fixed(x, xs); + def mkObj(x: A, xs: Fixed[A]) = new Fixed(x, xs); } diff --git a/tests/pos/t0061.scala b/tests/pos/t0061.scala index 8a3aed7c6..0228413fa 100644 --- a/tests/pos/t0061.scala +++ b/tests/pos/t0061.scala @@ -5,6 +5,6 @@ object O { case class testA() extends testClass ; def ga( x:testClass ) = x match { - case testA() => () + case testA() => () } } diff --git a/tests/pos/t0066.scala b/tests/pos/t0066.scala index 8ac328908..04bcd1f5d 100644 --- a/tests/pos/t0066.scala +++ b/tests/pos/t0066.scala @@ -1,7 +1,7 @@ class GBTree[A, B] { abstract class Tree[A,B]; case class Node[A,B](key:A,value:B,smaller:Node[A,B],bigger:Node[A,B]) - extends Tree[A,B]; + extends Tree[A,B]; case class Nil[A,B]() extends Tree[A,B]; } diff --git a/tests/pos/t0770.scala b/tests/pos/t0770.scala index 7a0a2bf9b..54990ec09 100644 --- a/tests/pos/t0770.scala +++ b/tests/pos/t0770.scala @@ -1,13 +1,13 @@ trait A { - private[this] val p = 5 + private[this] val p = 5 - def f = (b: Byte) => p + def f = (b: Byte) => p } trait B { - def failure: Boolean - def success = !failure + def failure: Boolean + def success = !failure } diff --git a/tests/pos/t1085.scala b/tests/pos/t1085.scala index c59e657cb..62f2be0b8 100644 --- a/tests/pos/t1085.scala +++ b/tests/pos/t1085.scala @@ -1,5 +1,5 @@ trait Functor[a] { - type MyType[a] + type MyType[a] } object Test { diff --git a/tests/pos/t1722/Test.scala b/tests/pos/t1722/Test.scala index f236d3fdc..f236d3fdc 100755..100644 --- a/tests/pos/t1722/Test.scala +++ b/tests/pos/t1722/Test.scala diff --git a/tests/pos/t1722/Top.scala b/tests/pos/t1722/Top.scala index 4ac52412a..4ac52412a 100755..100644 --- a/tests/pos/t1722/Top.scala +++ b/tests/pos/t1722/Top.scala diff --git a/tests/pos/t2060.scala b/tests/pos/t2060.scala index 0b9079062..0b9079062 100755..100644 --- a/tests/pos/t2060.scala +++ b/tests/pos/t2060.scala diff --git a/tests/pos/t2082.scala b/tests/pos/t2082.scala index a7ee3789b..34a7c4e3a 100755..100644 --- a/tests/pos/t2082.scala +++ b/tests/pos/t2082.scala @@ -13,7 +13,7 @@ trait IdPK class TestSubject extends KeyedMapper[Long, TestSubject] with IdPK class TestRun extends KeyedMapper[Long, TestRun] with IdPK { - object testSubject extends MappedForeignKey[Long, TestRun, TestSubject] + object testSubject extends MappedForeignKey[Long, TestRun, TestSubject] } object TestRun extends TestRun with KeyedMetaMapper[Long, TestRun] diff --git a/tests/pos/t2179.scala b/tests/pos/t2179.scala index 89e22b6e2..89e22b6e2 100755..100644 --- a/tests/pos/t2179.scala +++ b/tests/pos/t2179.scala diff --git a/tests/pos/t2208_pos.scala b/tests/pos/t2208_pos.scala index dd6d686ba..9f8f96c7d 100644 --- a/tests/pos/t2208_pos.scala +++ b/tests/pos/t2208_pos.scala @@ -1,8 +1,8 @@ object Test { - class A + class A - class B[X] - type Alias[X <: A] = B[X] + class B[X] + type Alias[X <: A] = B[X] - val foo: B[A] = new Alias[A] // check that type aliases can be instantiated + val foo: B[A] = new Alias[A] // check that type aliases can be instantiated } diff --git a/tests/pos/t2305.scala b/tests/pos/t2305.scala index 3338ab911..37d4ac6ca 100644 --- a/tests/pos/t2305.scala +++ b/tests/pos/t2305.scala @@ -5,22 +5,22 @@ trait Bind[Z[_]] class MySerializable[X] extends java.io.Serializable object Bind { - implicit val JavaArrayListBind: Bind[ArrayList] = new Bind[ArrayList] {} - implicit val MySerializableBind: Bind[MySerializable] = new Bind[MySerializable] {} + implicit val JavaArrayListBind: Bind[ArrayList] = new Bind[ArrayList] {} + implicit val MySerializableBind: Bind[MySerializable] = new Bind[MySerializable] {} } object works { - // this works fine: - def runbind(implicit bind: Bind[MySerializable]): Unit = {} - runbind + // this works fine: + def runbind(implicit bind: Bind[MySerializable]): Unit = {} + runbind } object breaks { - def runbind(implicit bind: Bind[ArrayList]): Unit = {} + def runbind(implicit bind: Bind[ArrayList]): Unit = {} runbind - /*java.lang.AssertionError: assertion failed: java.io.Serializable - at scala.Predef$.assert(Predef.scala:107) - at scala.tools.nsc.symtab.Types$TypeRef.transform(Types.scala:1417) - at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:1559) - */ + /*java.lang.AssertionError: assertion failed: java.io.Serializable + at scala.Predef$.assert(Predef.scala:107) + at scala.tools.nsc.symtab.Types$TypeRef.transform(Types.scala:1417) + at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:1559) + */ } diff --git a/tests/pos/t2405.scala b/tests/pos/t2405.scala index 224b2ce83..a4ac914fb 100644 --- a/tests/pos/t2405.scala +++ b/tests/pos/t2405.scala @@ -2,22 +2,22 @@ object A { implicit val x: Int = 1 } // Problem as stated in the ticket. object Test1 { - import A.{x => y} - implicitly[Int] + import A.{x => y} + implicitly[Int] } // Testing for the absense of shadowing #1. object Test2 { - import A.{x => y} - val x = 2 - implicitly[Int] + import A.{x => y} + val x = 2 + implicitly[Int] } // Testing for the absense of shadowing #2. object Test3 { - { - import A.{x => y} - def x: Int = 0 - implicitly[Int] - } + { + import A.{x => y} + def x: Int = 0 + implicitly[Int] + } } diff --git a/tests/pos/t2425.scala b/tests/pos/t2425.scala index 477d5467a..477d5467a 100755..100644 --- a/tests/pos/t2425.scala +++ b/tests/pos/t2425.scala diff --git a/tests/pos/t2429.scala b/tests/pos/t2429.scala index 4cda3bde1..4cda3bde1 100755..100644 --- a/tests/pos/t2429.scala +++ b/tests/pos/t2429.scala diff --git a/tests/pos/t2444.scala b/tests/pos/t2444.scala index fac1e95d0..fb93749aa 100644 --- a/tests/pos/t2444.scala +++ b/tests/pos/t2444.scala @@ -9,7 +9,7 @@ object Test { def frob[P1, P2<:Foo](f:P1 => P2) = () def main(args:Array[String]) : Unit = { - frob((p:Bar) => p.baz) + frob((p:Bar) => p.baz) } } diff --git a/tests/pos/t2484.scala b/tests/pos/t2484.scala index b822415fd..b822415fd 100755..100644 --- a/tests/pos/t2484.scala +++ b/tests/pos/t2484.scala diff --git a/tests/pos/t2500.scala b/tests/pos/t2500.scala index d0ff99a93..4b02fe488 100644 --- a/tests/pos/t2500.scala +++ b/tests/pos/t2500.scala @@ -1,6 +1,6 @@ object Test { - import scala.collection._ - ((Map(1 -> "a", 2 -> "b"): collection.Map[Int, String]) map identity[(Int, String)]) : scala.collection.Map[Int,String] - ((SortedMap(1 -> "a", 2 -> "b"): collection.SortedMap[Int, String]) map identity[(Int, String)]): scala.collection.SortedMap[Int,String] - ((SortedSet(1, 2): collection.SortedSet[Int]) map identity[Int]): scala.collection.SortedSet[Int] + import scala.collection._ + ((Map(1 -> "a", 2 -> "b"): collection.Map[Int, String]) map identity[(Int, String)]) : scala.collection.Map[Int,String] + ((SortedMap(1 -> "a", 2 -> "b"): collection.SortedMap[Int, String]) map identity[(Int, String)]): scala.collection.SortedMap[Int,String] + ((SortedSet(1, 2): collection.SortedSet[Int]) map identity[Int]): scala.collection.SortedSet[Int] } diff --git a/tests/pos/t2504.scala b/tests/pos/t2504.scala index 72117174c..72117174c 100755..100644 --- a/tests/pos/t2504.scala +++ b/tests/pos/t2504.scala diff --git a/tests/pos/t2545.scala b/tests/pos/t2545.scala index 6ad994223..6ad994223 100755..100644 --- a/tests/pos/t2545.scala +++ b/tests/pos/t2545.scala diff --git a/tests/pos/t2591.scala b/tests/pos/t2591.scala index 47ae551bf..59f7a02cc 100644 --- a/tests/pos/t2591.scala +++ b/tests/pos/t2591.scala @@ -7,9 +7,9 @@ object Implicits { } object Test { - // should cause imp to be in scope so that the next expression type checks - // `import Implicits._` works - import Implicits.imp + // should cause imp to be in scope so that the next expression type checks + // `import Implicits._` works + import Implicits.imp (new A) : Int } diff --git a/tests/pos/t2635.scala b/tests/pos/t2635.scala index 7cd553135..7cd553135 100755..100644 --- a/tests/pos/t2635.scala +++ b/tests/pos/t2635.scala diff --git a/tests/pos/t2683.scala b/tests/pos/t2683.scala index 4ba34b554..4ba34b554 100755..100644 --- a/tests/pos/t2683.scala +++ b/tests/pos/t2683.scala diff --git a/tests/pos/t3174.scala b/tests/pos/t3174.scala index 8d9b2578d..8d9b2578d 100755..100644 --- a/tests/pos/t3174.scala +++ b/tests/pos/t3174.scala diff --git a/tests/pos/t3278.scala b/tests/pos/t3278.scala index 05bfbc146..254f4dc79 100644 --- a/tests/pos/t3278.scala +++ b/tests/pos/t3278.scala @@ -1,30 +1,30 @@ class Foo class Test { - def update[B](x : B, b : Int): Unit = {} - def apply[B](x : B) = 1 + def update[B](x : B, b : Int): Unit = {} + def apply[B](x : B) = 1 } class Test2 { type B = Foo - def update(x : B, b : Int): Unit = {} - def apply(x : B) = 1 + def update(x : B, b : Int): Unit = {} + def apply(x : B) = 1 } object Test { - def main(a : Array[String]): Unit = { - val a = new Test - val f = new Foo - a(f) = 1 //works - a(f) = a(f) + 1 //works - a(f) += 1 //error: reassignment to val - } + def main(a : Array[String]): Unit = { + val a = new Test + val f = new Foo + a(f) = 1 //works + a(f) = a(f) + 1 //works + a(f) += 1 //error: reassignment to val + } } object Test2 { - def main(args : Array[String]): Unit = { + def main(args : Array[String]): Unit = { args(0) += "a" - val a = new Test2 - val f = new Foo - a(f) = 1 //works - a(f) = a(f) + 1 //works - a(f) += 1 //error: reassignment to val - } + val a = new Test2 + val f = new Foo + a(f) = 1 //works + a(f) = a(f) + 1 //works + a(f) += 1 //error: reassignment to val + } } |