Skip to content

Commit dad71ca

Browse files
committed
Ensure spaces after if in Dotty tests.
1 parent 74957b3 commit dad71ca

17 files changed

+20
-20
lines changed

tests/pending/pos/t4579.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ object LispAny extends Lisp {
400400

401401
val globalEnv = EmptyEnvironment
402402
.extend("=", Lambda{
403-
case List(arg1, arg2) => if(arg1 == arg2) 1 else 0})
403+
case List(arg1, arg2) => if (arg1 == arg2) 1 else 0})
404404
.extend("+", Lambda{
405405
case List(arg1: Int, arg2: Int) => arg1 + arg2
406406
case List(arg1: String, arg2: String) => arg1 + arg2})

tests/pending/pos/t5012.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class D {
44

55
class C {
66
def m: D = {
7-
if("abc".length == 0) {
7+
if ("abc".length == 0) {
88
object p // (program point 2)
99
}
1010
null

tests/pending/pos/t5541.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class HASkipListView[ S <: Sys[ S ], A ]( private val l: HASkipList[ S, A ])( im
3636
val szm = sz - 1
3737
val keys = IndexedSeq.tabulate( sz ) { i =>
3838
val key = n.key( i )
39-
(key, if( isRight && i == szm ) "M" else key.toString)
39+
(key, if ( isRight && i == szm ) "M" else key.toString)
4040
}
41-
val chbo = if( n.isLeaf ) None else {
41+
val chbo = if ( n.isLeaf ) None else {
4242
val nb = n.asBranch
4343
Some( IndexedSeq.tabulate( sz )( i => buildBoxMap( nb.down( i ), isRight && (i == szm) )))
4444
}

tests/pending/pos/tcpoly_seq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ trait HOSeq {
125125
// TODO: the var tl approach does not seem to work because subtyping isn't fully working yet
126126
final case class ::[+b](hd: b, private val tl: List[b]) extends List[b] {
127127
def head = hd
128-
def tail = if(tl==null) this else tl // hack
128+
def tail = if (tl==null) this else tl // hack
129129
override def isEmpty: Boolean = false
130130
}
131131

tests/pending/pos/tcpoly_seq_typealias.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ trait HOSeq {
129129
// TODO: the var tl approach does not seem to work because subtyping isn't fully working yet
130130
final case class ::[+b](hd: b, private val tl: List[b]) extends List[b] {
131131
def head = hd
132-
def tail = if(tl==null) this else tl // hack
132+
def tail = if (tl==null) this else tl // hack
133133
override def isEmpty: Boolean = false
134134
}
135135

tests/pending/pos/unapplySeq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
object FooSeq {
22
def unapplySeq(x:Any): Option[Product2[Int,Seq[String]]] = {
3-
if(x.isInstanceOf[Bar]) {
3+
if (x.isInstanceOf[Bar]) {
44
val y = x.asInstanceOf[Bar]
55
Some(y.size, y.name)
66
} else None

tests/pos/t262.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ object O {
33
def f:A;
44
}
55
class B extends A {
6-
def f = if(1 == 2) new C else new D;
6+
def f = if (1 == 2) new C else new D;
77
}
88
class C extends A {
99
def f = this;

tests/untried/neg/lubs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ object test1 {
33
class C extends A[C]
44
class D extends A[D]
55

6-
def f = if(1 == 2) new C else new D
6+
def f = if (1 == 2) new C else new D
77

88
val x1: A[Any] = f
99
val x2: A[A[Any]] = f

tests/untried/neg/t2275a.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object Test {
2-
if(true) {
2+
if (true) {
33
<br>
44
}else{
55
<span>{"louenesee"}</span>

tests/untried/neg/t963b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ object B {
1010
var a : A = _
1111
var b : Boolean = false
1212
def y : A = {
13-
if(b) {
13+
if (b) {
1414
a = new A { type T = Int; var v = 1 }
1515
a
1616
} else {

tests/untried/neg/xmlcorner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object pos
1111
def wrap(f : Int => Unit) = f(5)
1212

1313
wrap({ v =>
14-
if(v == 5) {
14+
if (v == 5) {
1515
val n = {
1616
val m = (<a>{}</a>)
1717
<div>{ v }</div>

tests/untried/pos/spec-sparsearray-new.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import scala.collection.mutable.MapLike
44
class SparseArray[@specialized(Int) T:ClassTag] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
55
override def get(x: Int) = {
66
val ind = findOffset(x)
7-
if(ind < 0) None else Some(sys.error("ignore"))
7+
if (ind < 0) None else Some(sys.error("ignore"))
88
}
99

1010
/**

tests/untried/pos/spec-sparsearray-old.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import scala.collection.mutable.MapLike
33
class SparseArray[@specialized(Int) T:ClassManifest] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
44
override def get(x: Int) = {
55
val ind = findOffset(x)
6-
if(ind < 0) None else Some(sys.error("ignore"))
6+
if (ind < 0) None else Some(sys.error("ignore"))
77
}
88

99
/**

tests/untried/pos/sudoku.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object SudokuSolver extends App {
1717
// Looping over a half-closed range of consecutive integers [l..u)
1818
// is factored out into a higher-order function
1919
def fold(f: (Int, Int) => Int, accu: Int, l: Int, u: Int): Int =
20-
if(l==u) accu else fold(f, f(accu, l), l + 1, u)
20+
if (l==u) accu else fold(f, f(accu, l), l + 1, u)
2121

2222
// The search function examines each position on the board in turn,
2323
// trying the numbers 1..9 in each unfilled position

tests/untried/pos/t262.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ object O {
33
def f:A;
44
}
55
class B extends A {
6-
def f = if(1 == 2) new C else new D;
6+
def f = if (1 == 2) new C else new D;
77
}
88
class C extends A {
99
def f = this;

tests/untried/pos/t3670.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ class B {
2525

2626
class C {
2727
val things = List("things")
28-
if(things.size < 100) {
28+
if (things.size < 100) {
2929
lazy val msg = "foo"
3030
msg
3131
}
3232
}
3333

3434
class D {
3535
val things = List("things")
36-
if(things.size < 100) {
36+
if (things.size < 100) {
3737
if (things.size > 10) {
3838
lazy val msg = "foo"
3939
msg

tests/untried/pos/unapplyComplex.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ class ComplexPolar(val _1: Double, val _2: Double) extends Complex {
1212

1313
object ComplexRect {
1414
def unapply(z:Complex): Option[Complex] = {
15-
if(z.isInstanceOf[ComplexRect]) Some(z) else z match {
15+
if (z.isInstanceOf[ComplexRect]) Some(z) else z match {
1616
case ComplexPolar(mod, arg) =>
1717
Some(new ComplexRect(mod*math.cos(arg), mod*math.sin(arg)))
1818
} } }
1919

2020
object ComplexPolar {
2121
def unapply(z:Complex): Option[Complex] = {
22-
if(z.isInstanceOf[ComplexPolar]) Some(z) else z match {
22+
if (z.isInstanceOf[ComplexPolar]) Some(z) else z match {
2323
case ComplexRect(re,im) =>
2424
Some(new ComplexPolar(math.sqrt(re*re + im*im), math.atan(re/im)))
2525
} } }

0 commit comments

Comments
 (0)