diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-09 16:13:04 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-09 16:13:04 +0200 |
commit | 6a5a6cca84221b90b14dbac8730cafef7f60e410 (patch) | |
tree | 26ed77e2406a698ad86e2a381589d1d7daebb5a3 /tests/untried | |
parent | 9602523e0b6b89b73f77ac45f9a5b58060fcd6cf (diff) | |
download | dotty-6a5a6cca84221b90b14dbac8730cafef7f60e410.tar.gz dotty-6a5a6cca84221b90b14dbac8730cafef7f60e410.tar.bz2 dotty-6a5a6cca84221b90b14dbac8730cafef7f60e410.zip |
Replace tabs with 4 spaces in Dotty tests.
Diffstat (limited to 'tests/untried')
46 files changed, 109 insertions, 109 deletions
diff --git a/tests/untried/neg-with-implicits/implicit-shadow.scala b/tests/untried/neg-with-implicits/implicit-shadow.scala index ec7f70b6d..b03d0edbd 100644 --- a/tests/untried/neg-with-implicits/implicit-shadow.scala +++ b/tests/untried/neg-with-implicits/implicit-shadow.scala @@ -1,11 +1,11 @@ object Test { - import B._, C._ + import B._, C._ - 1.isEmpty + 1.isEmpty } trait A { - implicit def i2s(i: Int): String = "" + implicit def i2s(i: Int): String = "" } object B extends A diff --git a/tests/untried/neg-with-implicits/t2405.scala b/tests/untried/neg-with-implicits/t2405.scala index 6982285b9..c005e7a54 100644 --- a/tests/untried/neg-with-implicits/t2405.scala +++ b/tests/untried/neg-with-implicits/t2405.scala @@ -2,9 +2,9 @@ object A { implicit val x: Int = 1 } // Expecting shadowing #1 object Test2 { - { - import A.{x => y} - def y: Int = 0 - implicitly[Int] - } + { + import A.{x => y} + def y: Int = 0 + implicitly[Int] + } } diff --git a/tests/untried/neg-with-implicits/t3006.scala b/tests/untried/neg-with-implicits/t3006.scala index a84b69c84..a84b69c84 100755..100644 --- a/tests/untried/neg-with-implicits/t3006.scala +++ b/tests/untried/neg-with-implicits/t3006.scala diff --git a/tests/untried/neg-with-implicits/t3224.scala b/tests/untried/neg-with-implicits/t3224.scala index b7af8a67b..b7af8a67b 100755..100644 --- a/tests/untried/neg-with-implicits/t3224.scala +++ b/tests/untried/neg-with-implicits/t3224.scala diff --git a/tests/untried/neg/override.scala b/tests/untried/neg/override.scala index 797551606..797551606 100755..100644 --- a/tests/untried/neg/override.scala +++ b/tests/untried/neg/override.scala diff --git a/tests/untried/neg/t1181.scala b/tests/untried/neg/t1181.scala index 5e5fceacc..6cae8f576 100644 --- a/tests/untried/neg/t1181.scala +++ b/tests/untried/neg/t1181.scala @@ -3,7 +3,7 @@ package test import scala.collection.immutable.Map class CompilerTest(val valueList: List[Symbol]) { - def buildMap(map: Map[Symbol, Symbol], keyList: List[Symbol], valueList: List[Symbol]): Map[Symbol, Symbol] = { + def buildMap(map: Map[Symbol, Symbol], keyList: List[Symbol], valueList: List[Symbol]): Map[Symbol, Symbol] = { (keyList, valueList) match { case (Nil, Nil) => map _ => buildMap(map.updated(keyList.head, valueList.head), keyList.tail, valueList.tail) diff --git a/tests/untried/neg/t1432.scala b/tests/untried/neg/t1432.scala index bdf233128..5df20121d 100644 --- a/tests/untried/neg/t1432.scala +++ b/tests/untried/neg/t1432.scala @@ -7,7 +7,7 @@ object Bug_NoUnique { type Alias2[E] = Wrap[E] def wrap[E,A,Y](v : (A,E=>Y)) : (A,Alias2[E]=>Y) = - throw new Error("Body here") + throw new Error("Body here") def test(x : TypeCon[Wrap[Unit]]) : TypeCon[Unit] = wrap(x) } diff --git a/tests/untried/neg/t2066b.scala b/tests/untried/neg/t2066b.scala index 2f8ffde14..aebf761fc 100644 --- a/tests/untried/neg/t2066b.scala +++ b/tests/untried/neg/t2066b.scala @@ -1,16 +1,16 @@ object Test extends App { - trait A { - def f[T[_]](x : T[Int]) : T[Any] - } + trait A { + def f[T[_]](x : T[Int]) : T[Any] + } - class B extends A { - def f[T[+_]](x : T[Int]) : T[Any] = x - } + class B extends A { + def f[T[+_]](x : T[Int]) : T[Any] = x + } - class P[Y](var y : Y) + class P[Y](var y : Y) - val p = new P(1) - val palias = (new B():A).f[P](p) - palias.y = "hello" - val z: Int = p.y + val p = new P(1) + val palias = (new B():A).f[P](p) + palias.y = "hello" + val z: Int = p.y } diff --git a/tests/untried/neg/t2208.scala b/tests/untried/neg/t2208.scala index 53165cc81..b86b1d9b3 100644 --- a/tests/untried/neg/t2208.scala +++ b/tests/untried/neg/t2208.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] - class C extends Alias[Any] // not ok, normalisation should check bounds before expanding Alias + class C extends Alias[Any] // not ok, normalisation should check bounds before expanding Alias } diff --git a/tests/untried/neg/t2336.scala b/tests/untried/neg/t2336.scala index 4cea02b72..4cea02b72 100755..100644 --- a/tests/untried/neg/t2336.scala +++ b/tests/untried/neg/t2336.scala diff --git a/tests/untried/neg/t2494.scala b/tests/untried/neg/t2494.scala index 71e6bc4bb..71e6bc4bb 100755..100644 --- a/tests/untried/neg/t2494.scala +++ b/tests/untried/neg/t2494.scala diff --git a/tests/untried/neg/t2773.scala b/tests/untried/neg/t2773.scala index aaa6351c8..aaa6351c8 100755..100644 --- a/tests/untried/neg/t2773.scala +++ b/tests/untried/neg/t2773.scala diff --git a/tests/untried/neg/t2779.scala b/tests/untried/neg/t2779.scala index d025055aa..d025055aa 100755..100644 --- a/tests/untried/neg/t2779.scala +++ b/tests/untried/neg/t2779.scala diff --git a/tests/untried/neg/t2870.scala b/tests/untried/neg/t2870.scala index 4de19242e..4de19242e 100755..100644 --- a/tests/untried/neg/t2870.scala +++ b/tests/untried/neg/t2870.scala diff --git a/tests/untried/neg/t2918.scala b/tests/untried/neg/t2918.scala index ff2be39ae..ff2be39ae 100755..100644 --- a/tests/untried/neg/t2918.scala +++ b/tests/untried/neg/t2918.scala diff --git a/tests/untried/neg/t2968.scala b/tests/untried/neg/t2968.scala index 41c3a798a..0adad4cd5 100644 --- a/tests/untried/neg/t2968.scala +++ b/tests/untried/neg/t2968.scala @@ -1,26 +1,26 @@ object t1 { - case object Const { - } + case object Const { + } - class Var - { + class Var + { } // missing brace object t2 { - case class Const() { - } + case class Const() { + } - class Var - { + class Var + { } // missing brace object t3 { - final case class Const() { - } + final case class Const() { + } - class Var - { + class Var + { } // missing brace diff --git a/tests/untried/neg/t3913.scala b/tests/untried/neg/t3913.scala index a5408fe02..ef8cf5591 100644 --- a/tests/untried/neg/t3913.scala +++ b/tests/untried/neg/t3913.scala @@ -4,5 +4,5 @@ object LimboStage extends Stage( Set( LimboStage )) object Test { def main( args: Array[ String ]): Unit = { val x = LimboStage - } + } } diff --git a/tests/untried/neg/t4460b.scala b/tests/untried/neg/t4460b.scala index 1233017dd..d347d5c53 100644 --- a/tests/untried/neg/t4460b.scala +++ b/tests/untried/neg/t4460b.scala @@ -1,9 +1,9 @@ trait A class Outer() { - class B(val x: Int) { - self: A => + class B(val x: Int) { + self: A => - def this() = this() // was binding to Predef.<init> !! - } + def this() = this() // was binding to Predef.<init> !! + } } diff --git a/tests/untried/neg/t4818.scala b/tests/untried/neg/t4818.scala index faae22920..c04b359b4 100644 --- a/tests/untried/neg/t4818.scala +++ b/tests/untried/neg/t4818.scala @@ -1,7 +1,7 @@ object Test { - case class Fn[A, B](f: A => B) + case class Fn[A, B](f: A => B) - def f(x: Any) = x match { case Fn(f) => f(5) } + def f(x: Any) = x match { case Fn(f) => f(5) } - Fn((x: String) => x) + Fn((x: String) => x) } diff --git a/tests/untried/neg/t576.scala b/tests/untried/neg/t576.scala index fd83217a4..2aaa65a65 100644 --- a/tests/untried/neg/t576.scala +++ b/tests/untried/neg/t576.scala @@ -6,7 +6,7 @@ abstract class BaseListXXX { } } trait PriorityTreeXXX extends BaseListXXX { - type Node <: BasicTreeNode; + type Node <: BasicTreeNode; trait BasicTreeNode extends BaseNode { def sibling: Node; diff --git a/tests/untried/neg/t6214.scala b/tests/untried/neg/t6214.scala index 0d5ffc5de..56d5e9360 100644 --- a/tests/untried/neg/t6214.scala +++ b/tests/untried/neg/t6214.scala @@ -2,6 +2,6 @@ object Test { def m(f: String => Unit) = 0 def m(f: Int => Unit) = 0 def foo: Unit = { - m { s => case class Foo() } + m { s => case class Foo() } } } diff --git a/tests/untried/neg/t6258.scala b/tests/untried/neg/t6258.scala index 19794b325..58236d154 100644 --- a/tests/untried/neg/t6258.scala +++ b/tests/untried/neg/t6258.scala @@ -1,10 +1,10 @@ object Test { - val f : PartialFunction[_, Int] = { case a : Int => a } // undefined param + val f : PartialFunction[_, Int] = { case a : Int => a } // undefined param - def foo[A](pf: PartialFunction[A, Int]): Unit = {}; - foo { case a : Int => a } // undefined param + def foo[A](pf: PartialFunction[A, Int]): Unit = {}; + foo { case a : Int => a } // undefined param - val g : PartialFunction[Int, _] = { case a : Int => a } // okay + val g : PartialFunction[Int, _] = { case a : Int => a } // okay } diff --git a/tests/untried/neg/t6558.scala b/tests/untried/neg/t6558.scala index b4304ff68..57f02f13f 100644 --- a/tests/untried/neg/t6558.scala +++ b/tests/untried/neg/t6558.scala @@ -7,6 +7,6 @@ class AnnotNotFound { class D[@typeparam T] class E( - @valueparam x: Any + @valueparam x: Any ) } diff --git a/tests/untried/neg/t771.scala b/tests/untried/neg/t771.scala index 26bf44164..26bf44164 100755..100644 --- a/tests/untried/neg/t771.scala +++ b/tests/untried/neg/t771.scala diff --git a/tests/untried/pos/ilya2/A.scala b/tests/untried/pos/ilya2/A.scala index 923b50f04..e9b225be8 100644 --- a/tests/untried/pos/ilya2/A.scala +++ b/tests/untried/pos/ilya2/A.scala @@ -1,3 +1,3 @@ class A { - def foo = new B().bar(null) + def foo = new B().bar(null) } diff --git a/tests/untried/pos/lexical.scala b/tests/untried/pos/lexical.scala index 8c29513bb..8c29513bb 100755..100644 --- a/tests/untried/pos/lexical.scala +++ b/tests/untried/pos/lexical.scala diff --git a/tests/untried/pos/packageobjs.scala b/tests/untried/pos/packageobjs.scala index ccab13371..ccab13371 100755..100644 --- a/tests/untried/pos/packageobjs.scala +++ b/tests/untried/pos/packageobjs.scala diff --git a/tests/untried/pos/pos-bug1210.scala b/tests/untried/pos/pos-bug1210.scala index eb163a956..c19e77e80 100644 --- a/tests/untried/pos/pos-bug1210.scala +++ b/tests/untried/pos/pos-bug1210.scala @@ -7,21 +7,21 @@ object Test abstract class M { self => - type Settings - type selfType = M {type Settings = self.Settings} + type Settings + type selfType = M {type Settings = self.Settings} val v: List[selfType] = f[selfType]((x: selfType) => x.v) } abstract class M2 { self => - type Settings - type selfType = M2 {type Settings = self.Settings} + type Settings + type selfType = M2 {type Settings = self.Settings} def g: List[selfType] = Nil { - f[selfType](_.g) + f[selfType](_.g) } } } diff --git a/tests/untried/pos/scoping2.scala b/tests/untried/pos/scoping2.scala index 39f3ef5f0..299c5e304 100644 --- a/tests/untried/pos/scoping2.scala +++ b/tests/untried/pos/scoping2.scala @@ -4,8 +4,8 @@ object That { trait I {} } trait B { - type T <: J; - trait J {} + type T <: J; + trait J {} } trait C extends A with B { type T <: I with J; diff --git a/tests/untried/pos/simple-exceptions.scala b/tests/untried/pos/simple-exceptions.scala index a9f16bf90..4572b9aa6 100644 --- a/tests/untried/pos/simple-exceptions.scala +++ b/tests/untried/pos/simple-exceptions.scala @@ -7,7 +7,7 @@ object Test { def main(args: Array[String]): Unit = { try { try { - Console.println("hi!") + Console.println("hi!") sys.error("xx") } finally Console.println("ho!") diff --git a/tests/untried/pos/spec-t6286.scala b/tests/untried/pos/spec-t6286.scala index 4d87998ec..4d87998ec 100755..100644 --- a/tests/untried/pos/spec-t6286.scala +++ b/tests/untried/pos/spec-t6286.scala diff --git a/tests/untried/pos/t2635.scala b/tests/untried/pos/t2635.scala index 7cd553135..7cd553135 100755..100644 --- a/tests/untried/pos/t2635.scala +++ b/tests/untried/pos/t2635.scala diff --git a/tests/untried/pos/t2683.scala b/tests/untried/pos/t2683.scala index 4ba34b554..4ba34b554 100755..100644 --- a/tests/untried/pos/t2683.scala +++ b/tests/untried/pos/t2683.scala diff --git a/tests/untried/pos/t3174b.scala b/tests/untried/pos/t3174b.scala index 4df1bfe83..4df1bfe83 100755..100644 --- a/tests/untried/pos/t3174b.scala +++ b/tests/untried/pos/t3174b.scala diff --git a/tests/untried/pos/t3570.scala b/tests/untried/pos/t3570.scala index 0e20905af..237391719 100644 --- a/tests/untried/pos/t3570.scala +++ b/tests/untried/pos/t3570.scala @@ -1,7 +1,7 @@ class test { - object Break extends Throwable - def break = throw Break - def block(x: => Unit): Unit = { - try { x } catch { case e: Break.type => } - } + object Break extends Throwable + def break = throw Break + def block(x: => Unit): Unit = { + try { x } catch { case e: Break.type => } + } } diff --git a/tests/untried/pos/t3578.scala b/tests/untried/pos/t3578.scala index d98411820..2ce92a776 100644 --- a/tests/untried/pos/t3578.scala +++ b/tests/untried/pos/t3578.scala @@ -2,16 +2,16 @@ object Test { sealed abstract class JValue { def ++(other: JValue) = { def append(value1: JValue, value2: JValue): JValue = (value1, value2) match { - case (JNothing, x) => x - case (x, JNothing) => x - case (JObject(xs), x: JField) => JObject(xs ::: List(x)) - case (x: JField, JObject(xs)) => JObject(x :: xs) - case (JArray(xs), JArray(ys)) => JArray(xs ::: ys) - case (JArray(xs), v: JValue) => JArray(xs ::: List(v)) - case (v: JValue, JArray(xs)) => JArray(v :: xs) - case (f1: JField, f2: JField) => JObject(f1 :: f2 :: Nil) - case (JField(n, v1), v2: JValue) => JField(n, append(v1, v2)) - case (x, y) => JArray(x :: y :: Nil) + case (JNothing, x) => x + case (x, JNothing) => x + case (JObject(xs), x: JField) => JObject(xs ::: List(x)) + case (x: JField, JObject(xs)) => JObject(x :: xs) + case (JArray(xs), JArray(ys)) => JArray(xs ::: ys) + case (JArray(xs), v: JValue) => JArray(xs ::: List(v)) + case (v: JValue, JArray(xs)) => JArray(v :: xs) + case (f1: JField, f2: JField) => JObject(f1 :: f2 :: Nil) + case (JField(n, v1), v2: JValue) => JField(n, append(v1, v2)) + case (x, y) => JArray(x :: y :: Nil) } append(this, other) } diff --git a/tests/untried/pos/t4220.scala b/tests/untried/pos/t4220.scala index 98f264976..280bb6dab 100644 --- a/tests/untried/pos/t4220.scala +++ b/tests/untried/pos/t4220.scala @@ -3,5 +3,5 @@ class Boo(a: Int = 0) object test { - class Boo + class Boo } diff --git a/tests/untried/pos/t443.scala b/tests/untried/pos/t443.scala index cdaefe9ec..f1f7ec258 100644 --- a/tests/untried/pos/t443.scala +++ b/tests/untried/pos/t443.scala @@ -3,12 +3,12 @@ object Test { def lookup(): Option[Tuple2[String, String]] = ((null: Option[Tuple2[String, String]]) : @unchecked) match { case Some((_, _)) => - if (true) - Some((null, null)) - else - lookup() match { - case Some(_) => Some(null) - case None => None - } + if (true) + Some((null, null)) + else + lookup() match { + case Some(_) => Some(null) + case None => None + } } } diff --git a/tests/untried/pos/t4842.scala b/tests/untried/pos/t4842.scala index 17ff68483..24a71294d 100644 --- a/tests/untried/pos/t4842.scala +++ b/tests/untried/pos/t4842.scala @@ -13,14 +13,14 @@ class Blerg (x: AnyRef) { class Outer { - class Inner (x: AnyRef) { - def this() = { - this(new { class Bar { println(Bar.this); new { println(Bar.this) } }; new Bar } ) // okay - } + class Inner (x: AnyRef) { + def this() = { + this(new { class Bar { println(Bar.this); new { println(Bar.this) } }; new Bar } ) // okay + } - def this(x: Boolean) = { - this(new { println(Outer.this) } ) // okay - } - } + def this(x: Boolean) = { + this(new { println(Outer.this) } ) // okay + } + } } diff --git a/tests/untried/pos/t6028/t6028_1.scala b/tests/untried/pos/t6028/t6028_1.scala index 6edb76069..521d2e07d 100644 --- a/tests/untried/pos/t6028/t6028_1.scala +++ b/tests/untried/pos/t6028/t6028_1.scala @@ -1,3 +1,3 @@ class C { - def foo(a: Int): Unit = () => a + def foo(a: Int): Unit = () => a } diff --git a/tests/untried/pos/t6028/t6028_2.scala b/tests/untried/pos/t6028/t6028_2.scala index f44048c0a..de053b8e6 100644 --- a/tests/untried/pos/t6028/t6028_2.scala +++ b/tests/untried/pos/t6028/t6028_2.scala @@ -1,4 +1,4 @@ object Test { - // ensure that parameter names are untouched by lambdalift - new C().foo(a = 0) + // ensure that parameter names are untouched by lambdalift + new C().foo(a = 0) } diff --git a/tests/untried/pos/t6601/UsePrivateValueClass_2.scala b/tests/untried/pos/t6601/UsePrivateValueClass_2.scala index 461b8397b..ec9793751 100644 --- a/tests/untried/pos/t6601/UsePrivateValueClass_2.scala +++ b/tests/untried/pos/t6601/UsePrivateValueClass_2.scala @@ -1,8 +1,8 @@ object Test { - // After the first attempt to make seprately compiled value - // classes respect the privacy of constructors, we got: - // - // exception when typing v.a().==(v.a())/class scala.reflect.internal.Trees$Apply + // After the first attempt to make seprately compiled value + // classes respect the privacy of constructors, we got: + // + // exception when typing v.a().==(v.a())/class scala.reflect.internal.Trees$Apply // constructor V in class V cannot be accessed in object Test in file test/files/pos/t6601/UsePrivateValueClass_2.scala // scala.reflect.internal.Types$TypeError: constructor V in class V cannot be accessed in object Test def foo(v: V) = v.a == v.a diff --git a/tests/untried/pos/t7532b/A_1.scala b/tests/untried/pos/t7532b/A_1.scala index 586465ee6..6d70d15ff 100644 --- a/tests/untried/pos/t7532b/A_1.scala +++ b/tests/untried/pos/t7532b/A_1.scala @@ -1,7 +1,7 @@ package pack class R { - class attr // Will have the bytecode name `R$attr`, not to be confused with `R@tr`! - class `@` + class attr // Will have the bytecode name `R$attr`, not to be confused with `R@tr`! + class `@` } class `@` diff --git a/tests/untried/pos/tcpoly_infer_easy.scala b/tests/untried/pos/tcpoly_infer_easy.scala index 0f1929502..bfa369f4a 100644 --- a/tests/untried/pos/tcpoly_infer_easy.scala +++ b/tests/untried/pos/tcpoly_infer_easy.scala @@ -1,5 +1,5 @@ object Test { - def test[CC[+X] <: Iterable[X], A](xs: CC[A]): CC[A] = xs - val xs = test(List(1,2)) - val xs2: List[Int] = test(List(1,2)) + def test[CC[+X] <: Iterable[X], A](xs: CC[A]): CC[A] = xs + val xs = test(List(1,2)) + val xs2: List[Int] = test(List(1,2)) } diff --git a/tests/untried/pos/test4refine.scala b/tests/untried/pos/test4refine.scala index 671096293..abf078193 100644 --- a/tests/untried/pos/test4refine.scala +++ b/tests/untried/pos/test4refine.scala @@ -18,7 +18,7 @@ trait S extends o.I { abstract class O() { type X; abstract trait I { - type Y; + type Y; def foo(x: X, y: Y): E = e; } val i:I { type Y = E } = null; diff --git a/tests/untried/pos/unapplyComplex.scala b/tests/untried/pos/unapplyComplex.scala index 148fcc1bb..8e0fe7821 100644 --- a/tests/untried/pos/unapplyComplex.scala +++ b/tests/untried/pos/unapplyComplex.scala @@ -14,26 +14,26 @@ object ComplexRect { def unapply(z:Complex): Option[Complex] = { if(z.isInstanceOf[ComplexRect]) Some(z) else z match { case ComplexPolar(mod, arg) => - Some(new ComplexRect(mod*math.cos(arg), mod*math.sin(arg))) + Some(new ComplexRect(mod*math.cos(arg), mod*math.sin(arg))) } } } object ComplexPolar { def unapply(z:Complex): Option[Complex] = { if(z.isInstanceOf[ComplexPolar]) Some(z) else z match { case ComplexRect(re,im) => - Some(new ComplexPolar(math.sqrt(re*re + im*im), math.atan(re/im))) + Some(new ComplexPolar(math.sqrt(re*re + im*im), math.atan(re/im))) } } } object Test { def main(args:Array[String]) = { new ComplexRect(1,1) match { case ComplexPolar(mod,arg) => // z @ ??? - Console.println("mod"+mod+"arg"+arg) + Console.println("mod"+mod+"arg"+arg) } val Komplex = ComplexRect new ComplexPolar(math.sqrt(2),math.Pi / 4.0) match { case Komplex(re,im) => // z @ ??? - Console.println("re"+re+" im"+im) + Console.println("re"+re+" im"+im) } } } |