aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg')
-rw-r--r--tests/untried/neg/for-comprehension-old.scala16
-rw-r--r--tests/untried/neg/names-defaults-neg.scala2
-rw-r--r--tests/untried/neg/specification-scopes/P_2.scala16
-rw-r--r--tests/untried/neg/switch.scala2
-rw-r--r--tests/untried/neg/t5702-neg-bad-xbrace.scala2
-rw-r--r--tests/untried/neg/t5702-neg-ugly-xbrace.scala2
-rw-r--r--tests/untried/neg/t856.scala2
-rw-r--r--tests/untried/neg/warn-unused-privates.scala2
8 files changed, 22 insertions, 22 deletions
diff --git a/tests/untried/neg/for-comprehension-old.scala b/tests/untried/neg/for-comprehension-old.scala
index 10ae363bd..270861751 100644
--- a/tests/untried/neg/for-comprehension-old.scala
+++ b/tests/untried/neg/for-comprehension-old.scala
@@ -1,11 +1,11 @@
class A {
- for (x <- 1 to 5 ; y = x) yield x+y // ok
- for (x <- 1 to 5 ; val y = x) yield x+y // fail
- for (val x <- 1 to 5 ; y = x) yield x+y // fail
- for (val x <- 1 to 5 ; val y = x) yield x+y // fail
+ for (x <- 1 to 5 ; y = x) yield x + y // ok
+ for (x <- 1 to 5 ; val y = x) yield x + y // fail
+ for (val x <- 1 to 5 ; y = x) yield x + y // fail
+ for (val x <- 1 to 5 ; val y = x) yield x + y // fail
- for (z <- 1 to 2 ; x <- 1 to 5 ; y = x) yield x+y // ok
- for (z <- 1 to 2 ; x <- 1 to 5 ; val y = x) yield x+y // fail
- for (z <- 1 to 2 ; val x <- 1 to 5 ; y = x) yield x+y // fail
- for (z <- 1 to 2 ; val x <- 1 to 5 ; val y = x) yield x+y // fail
+ for (z <- 1 to 2 ; x <- 1 to 5 ; y = x) yield x + y // ok
+ for (z <- 1 to 2 ; x <- 1 to 5 ; val y = x) yield x + y // fail
+ for (z <- 1 to 2 ; val x <- 1 to 5 ; y = x) yield x + y // fail
+ for (z <- 1 to 2 ; val x <- 1 to 5 ; val y = x) yield x + y // fail
}
diff --git a/tests/untried/neg/names-defaults-neg.scala b/tests/untried/neg/names-defaults-neg.scala
index 2f8700ac6..589259622 100644
--- a/tests/untried/neg/names-defaults-neg.scala
+++ b/tests/untried/neg/names-defaults-neg.scala
@@ -98,7 +98,7 @@ object Test extends App {
f3818(y = 1, m = 1)
// DEFINITIONS
- def test1(a: Int, b: String) = a +": "+ b
+ def test1(a: Int, b: String) = a +": " + b
def test2(x: Unit) = println("test2")
def test3(a: Int, b: Int) = a + b
def test7(m: Int) = m
diff --git a/tests/untried/neg/specification-scopes/P_2.scala b/tests/untried/neg/specification-scopes/P_2.scala
index d59f82e90..03a52bdcd 100644
--- a/tests/untried/neg/specification-scopes/P_2.scala
+++ b/tests/untried/neg/specification-scopes/P_2.scala
@@ -1,21 +1,21 @@
package P { // 'X' bound by package clause
import Console._ // 'println' bound by wildcard import
object A {
- println("L4: "+X) // 'X' refers to 'P.X' here
+ println("L4: " + X) // 'X' refers to 'P.X' here
object B {
import Q._ // 'X' bound by wildcard import
- println("L7: "+X) // 'X' refers to 'Q.X' here
+ println("L7: " + X) // 'X' refers to 'Q.X' here
import X._ // 'x' and 'y' bound by wildcard import
- println("L8: "+x) // 'x' refers to 'Q.X.x' here
+ println("L8: " + x) // 'x' refers to 'Q.X.x' here
object C {
val x = 3 // 'x' bound by local definition
- println("L12: "+x); // 'x' refers to constant '3' here
+ println("L12: " + x); // 'x' refers to constant '3' here
{ import Q.X._ // 'x' and 'y' bound by wildcard
- println("L14: "+x) // reference to 'x' is ambiguous here
+ println("L14: " + x) // reference to 'x' is ambiguous here
import X.y // 'y' bound by explicit import
- println("L16: "+y); // 'y' refers to 'Q.X.y' here
+ println("L16: " + y); // 'y' refers to 'Q.X.y' here
{ val x = "abc" // 'x' bound by local definition
import P.X._ // 'x' and 'y' bound by wildcard
- println("L19: "+y) // reference to 'y' is ambiguous here
- println("L20: "+x) // 'x' refers to string ''abc'' here
+ println("L19: " + y) // reference to 'y' is ambiguous here
+ println("L20: " + x) // 'x' refers to string ''abc'' here
}}}}}}
diff --git a/tests/untried/neg/switch.scala b/tests/untried/neg/switch.scala
index a66ed768f..b4d3392f9 100644
--- a/tests/untried/neg/switch.scala
+++ b/tests/untried/neg/switch.scala
@@ -55,7 +55,7 @@ object Main {
}
// some ints just to mix it up a bit
- def succ4(x: Int, y: Int) = ((x+y): @switch) match {
+ def succ4(x: Int, y: Int) = ((x + y): @switch) match {
case 1 => 5
case 2 => 10
case 3 => 20
diff --git a/tests/untried/neg/t5702-neg-bad-xbrace.scala b/tests/untried/neg/t5702-neg-bad-xbrace.scala
index 64bbdb18b..89f5b5d62 100644
--- a/tests/untried/neg/t5702-neg-bad-xbrace.scala
+++ b/tests/untried/neg/t5702-neg-bad-xbrace.scala
@@ -26,6 +26,6 @@ object Test {
val xml = <top><a>apple</a><b>boy</b><c>child</c></top>
// bad brace or paren after _*
val <top>{a, z@_*)}</top> = xml
- println("A for "+ a +", ending with "+ z)
+ println("A for " + a +", ending with "+ z)
}
}
diff --git a/tests/untried/neg/t5702-neg-ugly-xbrace.scala b/tests/untried/neg/t5702-neg-ugly-xbrace.scala
index 0ff7bfa09..bb587e812 100644
--- a/tests/untried/neg/t5702-neg-ugly-xbrace.scala
+++ b/tests/untried/neg/t5702-neg-ugly-xbrace.scala
@@ -9,6 +9,6 @@ object Test {
// Assuming } for ) after _* would not be not outlandish.
// bad brace or paren after _*
val <top>{a, z@_*)</top> = xml
- println("A for "+ a +", ending with "+ z)
+ println("A for " + a +", ending with "+ z)
}
}
diff --git a/tests/untried/neg/t856.scala b/tests/untried/neg/t856.scala
index fea216bfa..a239ac9eb 100644
--- a/tests/untried/neg/t856.scala
+++ b/tests/untried/neg/t856.scala
@@ -1,7 +1,7 @@
trait Complex extends Product2[Double,Double]
class ComplexRect(val _1:Double, _2:Double) extends Complex {
- override def toString = "ComplexRect("+_1+","+_2+")"
+ override def toString = "ComplexRect(" +_1 +","+_2 +")"
}
object Test {
diff --git a/tests/untried/neg/warn-unused-privates.scala b/tests/untried/neg/warn-unused-privates.scala
index cb6e946a3..64e7679f3 100644
--- a/tests/untried/neg/warn-unused-privates.scala
+++ b/tests/untried/neg/warn-unused-privates.scala
@@ -1,7 +1,7 @@
class Bippy(a: Int, b: Int) {
private def this(c: Int) = this(c, c) // warn
private def bippy(x: Int): Int = bippy(x) // TODO: could warn
- private def boop(x: Int) = x+a+b // warn
+ private def boop(x: Int) = x + a + b // warn
final private val MILLIS1 = 2000 // no warn, might have been inlined
final private val MILLIS2: Int = 1000 // warn
final private val HI_COMPANION: Int = 500 // no warn, accessed from companion